check if the response is valid JSON on the back-end