Yes, but a better way to avoid that, if you want to get this far at all, is to do something like this at the very top of the method:

```ruby
return {} if criteria.empty?
```

Passing an empty array isn't an invalid call (unless you specify that it is), so it should return a valid response if it happens. Currently, it will blow up.