Fixed logic for 'should not be in JSON'

The 'should not be in JSON' sentence never fails, because the throw is caught by the exception handler.

This change handles the success and failure of the JSON parsing, so that successful parsing of valid JSON causes an exception to be thrown, but unsuccessful parsing (bad JSON, non-JSON data, null data, etc) will bypass the throw.