Add support for empty response

For empty responses the server does not set the content-type to application/json.
This change makes us only validate the content type if we expect a non-empty
response.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//468633008