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