Why not check the class with `instanceof`?