javascript check if exists in map