castIfPossible

fun <T> Class<T>.castIfPossible(obj: Any): T?