javascript map check if key exists