check if dictionary is empty javascript