check if a key is in a dictionary python