Should we do

```
var hits = results.hits || {};
var total = hits.total || 0;
if (!hits.hits || hits.hits.length === 0) {
  ...
```