javascript dict check if key exists