def empty(value):
    """test if a value is empty

    >>> empty('')
    True

    >>> empty(' ')
    True

    >>> empty('\\n')
    True

    >>> empty('x')
    False

    >>> empty(1)
    False
    """
    try:
        return not value or value.isspace()
    except AttributeError:
        return False
