withCharsetIfNeeded

Creates a copy of this type with the added charset parameter with charset value if ContentType is not ignored