javascript check for key in dictionary