Then after loop call:
```php
if ('' === $read[$type]) {
    unset($read[$type]);
}
```
Calling `isset()` in loop, add not needed internal calls (especially for big output) that can be easily skipped.