match on class type explicitly so it will be a compile time error not runtime.