you can change the condition to
```php
if (!$row)
```