class Foo {...} main() { var foo = new Foo(); if (foo is Foo) { // Check done here print("it's a foo!"); } }