you should deal  with the case when the map is null... but it should be processed in the update...() method