def _bytes_to_unicode(obj):
    """
    Convert a non-`bytes` type object into a unicode string.

    :param obj: the object to convert
    :return: If the supplied `obj` is of type `bytes`, decode it into a unicode
        string. If the `obj` is anything else (including None), the original
        `obj` is returned. If the object is converted into a unicode string,
        the type would be `unicode` for Python 2.x or `str` for Python 3.x.
    """
    return obj.decode() if isinstance(obj, bytes) else obj