Use isset instead of array_key_exists.