title: How to handle null input parameters in Scala
body: <p>I know in Scala a method should never return <code>null</code>... but what's about input parameters? Given the following code snippet...</p>
  
  <pre><code>object MyObject {
  
      def myMethod(p: String): Option[String] = {
          if (p == null) throw new IllegalArgumentException("p is null.")
          ...
      }
  }
  </code></pre>
  
  <p>... is the way I check <code>p</code> correct? Is there any recommendation?</p>