javascript map object check if key exists