as?is a safe broadcast operator .
Usually, if you try to use a variable and it fails, you get ClassCastException. Using this operator, it simply returns nullin this case.
This means that the return type of the expression foo as? Foois actually Foo?because it can return null.
foo as Foo? foo Foo?, , (.. foo null)).