allowing null to be passed in for map