Catching nullpointer if map is null