title: How to set not null for function params in kotlin
body: <p>I'm creating one function in <code>Kotlin</code>. It validates email and password fields. I want to apply email and password should not be null. <code>@NotNull</code> kinda annotation here. </p>
  
  <p>Does anyone know how to do this in <code>Kotlin</code>? So the caller cannot send the null value.</p>
  
  <pre><code>private fun isEmailAndPasswordValid(email: String, password: String): Boolean {
  
      if (email.isEmpty()) return false
  
      if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) return false
  
      if (password.isEmpty()) return false
  
      return true
  }
  </code></pre>