def empty_str(in_str):
    """
    Simple helper to return True if the passed
    string reference is None or '' or all whitespace

    """
    if in_str is not None and not isinstance(in_str, str):
        raise TypeError('Arg must be None or a string type')

    return in_str is None or \
        len(in_str.strip()) == 0