This would be safer to handle in a case:
```
case ej:get({<<"total_rows">>}, Res) of
     N when is_integer(N) andalso N > 0 -> true;
     _ -> false
end
```

Erlang orders all terms so `>` is valid just about anywhere, but may not be what you expect. So in this case if you got error JSON then TotalRows would be `undefined`:
```
1> undefined > 0.
true
```