if not, content_type is an empty string and content_type_extra is an empty dictionary. strip the content_type of the whitespaces, substitute it for content_type.
content_type = content_type . strip ( )