Check if the response code is valid before parse