@marcj We could add these lines here:

```php
if ($this->isEmpty()) {
    return null;
}
```

This should fix both phpunit errors.