Kotlin call function only if all arguments are not null : <p>Is there a way in kotlin to prevent function call if all (or some) arguments are null? For example Having function:</p>

<pre><code>fun test(a: Int, b: Int) { /* function body here */ }
</code></pre>

<p>I would like to prevent null checks in case when arguments are <code>null</code>. For example, for arguments:</p>

<pre><code>val a: Int? = null
val b: Int? = null 
</code></pre>

<p>I would like to replace:</p>

<pre><code>a?.let { b?.let { test(a, b) } }
</code></pre>

<p>with:</p>

<pre><code>test(a, b)
</code></pre>

<p>I imagine that function definition syntax could look something like this:</p>

<pre><code>fun test(@PreventNullCall a: Int, @PreventNullCall b: Int)
</code></pre>

<p>And that would be equivalent to:</p>

<pre><code>fun test(a: Int?, b: Int?) {
    if(a == null) {
        return
    }

    if(b == null) {
        return
    }

    // function body here
}
</code></pre>

<p>Is something like that (or similar) possible to reduce caller (and possibly function author) redundant code?</p>
