def _convert_string_to_unicode(string):
    """
    If the string is bytes, decode it to a string (for python3 support)
    """
    result = string
    try:
        if string is not None and not isinstance(string, str):
            result = string.decode('utf-8')
    except (TypeError, UnicodeDecodeError, AttributeError):
        pass
    return result
