ofType

inline fun <T : Any, R : T> ofType(cls: KClass<R>): T


inline fun <T : Any> ofType(): T

Checks if the value belongs to the type.