title: How to declare a variable with two types in Kotlin, like val x: Int or String
body: <p>I'm gonna write a method like:</p>
  
  <pre><code>object UIBehavior {
     fun dialog(context: Context, title: Int | String, message: Int | String){
       val dialogObj = AlertDialog.Builder(context)
       dialogObj.setTitle(title)
       dialogObj.setMessage(message)
     }
  }
  </code></pre>
  
  <p>The methods <em>dialogObj.setTitle</em> and <em>dialogObj.setMessage</em> allow two types of parameters, and how can I delare the parameter that can let the method <em>dialog</em> allow only two types Int and String?</p>