Move body type checks to rest_response_body, which is not called by rest_xlat.