def objExists(obj):
    if isinstance(obj, (Node, Plug)):
        obj = obj.path()
    try:
        om.MSelectionList().add(obj)
    except RuntimeError:
        return False
    else:
        return True
def objExists(obj):
    if isinstance(obj, (Node, Plug)):
        obj = obj.path()
    try:
        om.MSelectionList().add(obj)
    except RuntimeError:
        return False
    else:
        return True