safeCast

fun safeCast(value: Any): T?(source)

Attempts to cast value to this class, and returns null if it is not possible. This is the same as using the as? operator.

See also