isTypeOfOrNull

inline fun <T> Any?.isTypeOfOrNull(): Boolean

Checks if the object is of the specified generic type T or is null. This is a convenient shorthand for this is T?.

Return

true if the receiver is an instance of T or is null, false otherwise.

Type Parameters

T

The type to check against.