check if key exists instead of value