Correct NPE when only 'Content-Type' header is present on non-body requests.

Closes #557.

@edenman