def is_only_whitespace(obj):
    """
    If the obj has `strip` return True if calling strip on the obj results in
    an empty instance. Otherwise, return False.
    """
    if hasattr(obj, 'strip'):
        return not obj.strip()
    return False
