Union.isType

bool isType(T)() @trusted nothrow @nogc

Returns true if the given type is the same as the currently active type.