check_const looks for UnionType (not HierarchyType)