import six


def ensure_unicode_string(value: str) -> str:
    """Ensure the value is a string, and return it as unicode."""
    if not isinstance(value, six.string_types):
        raise TypeError("Expected string value, got: {}".format(value))
    return six.text_type(value)