Add contains method for checking if a type is already in the map.