Small enhancement to .query()

Currently, passing an empty object to `.query()` causes an empty string to be appended to `_query`. This just adds a check to ensure `val` is truthy before appending it. (test included)