Converting parameter types in get_content_type() for Python3 compatibility

When mimetype and charset input parameters are passed with inconsistent types (sometimes bytes and sometimes string/unicode), string comparison would sometimes fail in Python3 since it requires same data-types for string comparison

>>> b''.startswith('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: startswith first arg must be bytes or a tuple of bytes, not str