def isblank(s):
    """Is this whitespace or an empty string?"""
    if isinstance(s, str):
        if not s:
            return True
        else:
            return s.isspace()
    else:
        return False