def is_timezone_aware(value):
    """Check if a datetime is time zone aware.

    `is_timezone_aware()` is the inverse of `is_timezone_naive()`.

    :param value: A valid datetime object.
    :type value: datetime.datetime, datetime.time
    :returns: bool -- if the object is time zone aware.
    :raises: TypeError

    .. versionchanged:: 0.4.0
       ``TypeError`` is raised

    .. versionadded:: 0.3.0
    """

    if not hasattr(value, 'tzinfo'):
        message =  "'{0}' object is not a valid time."
        raise TypeError(message.format(type(value).__name__))

    return not (value.tzinfo is None or value.tzinfo.utcoffset(value) is None)