Replaced `array_key_exists` with `isset` for better performance.