Don't fail if setContentType is called with null

fixes https://community.jboss.org/message/857927