switched key checking on permit from self[key].present? to has_key? key