Fixing NPE crash when a post request without a contentTypeHeader is made