I might be wrong, but isset should be fine here, I would think the fix would be more like:
```php
if ( isset( $result['responseHeaders'] ) && is_array( $result['responseHeaders'] ) )
```