Issue #305

My testing showed that (despite what the official docs said) `json` is always a valid object (it is just empty if the JSON string was invalid).

The code in the client side which handles errors works the same if we return an empty array (the previous behaviour) or a map with keys but null values (this new behaviour). So removing the `if` check makes no functional change to the behaviour on the client side.