Replaces key_exists with array_key_exists