Fix checking for schema's highest type attribute: allow union values