withType

inline fun <T : R, R> R.withType(block: T.() -> R): R

Do the operation on this if the type of this is T, and return R, otherwise return this