If c is not contained in myMap, it will return null, which can’t be unboxed as a boolean.
Try :
Boolean b = myMap.get(c);
if(b != null && b){
...
If c is not contained in myMap, it will return null, which can’t be unboxed as a boolean.
Try :
Boolean b = myMap.get(c);
if(b != null && b){
...