TryAs extension

on

Methods

tryAs<T>() → T?

Available on Object?, provided by the TryAs extension

Safely casts the value to T if it is T, otherwise returns null.