title: Kotlin Compilation Error : None of the following functions can be called with the arguments supplied
body: <p>I have a class whose constructor takes 2 int parameters (null values are allowed).
      Following is the compilation error.</p>
  
  <pre><code>None of the following functions can be called with the arguments supplied: 
  public final operator fun plus(other: Byte): Int defined in kotlin.Int
  public final operator fun plus(other: Double): Double defined in kotlin.Int
  public final operator fun plus(other: Float): Float defined in kotlin.Int
  public final operator fun plus(other: Int): Int defined in kotlin.Int
  public final operator fun plus(other: Long): Long defined in kotlin.Int
  public final operator fun plus(other: Short): Int defined in kotlin.Int
  </code></pre>
  
  <p>Here is the NumberAdder class.</p>
  
  <pre><code>class NumberAdder (num1 : Int?, num2 : Int?) {
  
      var first : Int? = null
      var second : Int? = null
  
      init{
      first = num1
      second = num2
      }
  
  fun add() : Int?{
  
      if(first != null &amp;&amp; second != null){
          return first + second
      }
  
      if(first == null){
          return second
      }
  
      if(second == null){
          return first
      }
  
      return null
  }
  
  }
  </code></pre>
  
  <p>How can I resolve this issue? I want to return null if both are null. If one of them is null, return the other, and otherwise return the sum.</p>