check if the map has a matching item before adding things to it