fun test(foo: Int?) { if (foo == null) throw IllegalArgumentException("foo") // Replace guard clause with kotlin's function call }