def isUnit(u):
    """Answers if u is an instance of Unit.

    >>> isUnit(pt(20))
    True
    >>> isUnit(pt(20, 21))
    False
    >>> isUnit(2)
    False
    """
    return hasattr(u, 'v') and hasattr(u, 'g') and hasattr(u, 'base')
