Check that the API response is valid.