Function isHierarchical