I'd prefer this if that's ok:

```ruby
return unless categories
```