Prevents the json_decode function is executed in a response that is not string