val Any?.unit get() = Unit
fun <T> T?.throwOnNullIf(throwCondition: Boolean, exception: () -> Throwable) =
if (this == null && throwCondition) throw exception() else this
val Any?.unit get() = Unit
fun <T> T?.throwOnNullIf(throwCondition: Boolean, exception: () -> Throwable) =
if (this == null && throwCondition) throw exception() else this