checking for duplicate variant names (datatype variant names are
already checked)