Make sure the response from the api is valid json