Alternative to if…case

I believe it's impossible to do better than using the type name.

(EnumType.synonym ~= tag) == false

Make a !~= if you need it a lot.