def to_unicode(s, encoding=None):
        """
        Raises a TypeError exception if the given string is already unicode.

        """