Improved Error Handling

This looks like it'd throw an exception if `query` was `{}`, as that would decode to an empty array. Also, I don't think `$input->getArgument('query')` needs to be checked at all, since it's already a required argument.

Simply requiring that `json_decode()` returned an array should be sufficient -- and then there is no need to cast the argument to `setQueryArray()` below.

If we don't decode into an array, the exception can state `Expected query object, "%s" given` with `gettype()` used for `%s`. And if `json_decode()` returned `null`, the JSON might have actually been a null value or there may be a decoding error. We can conditionally check `json_last_error()` and, if necessary, report that `JSON decoding failed: %d`, with `%d` being the error code.