Open
Description
It'll be a little enhancement but so much pleasant one :)
Kotlin and Swift has something like Safe casting with as?
operator. It gives an opportunity to casting with null
fallback if cast can't be performed:
void someFunction(dynamic arg) {
// we could has something like
final classVariable = (arg as? SomeClass)?.someValue;
// in place of
final classVariable = arg is SomeClass ? arg.someValue : null;
}