Make variant discriminator type customizable.