Added static method to determine variant type