title: Replace null values in a list with another value in Scala
body: <p>I'm attempting to replace the null elements of a Scala list with an empty value using <code>map</code>. I currently have:</p>
  
  <pre><code>val arr = Seq("A:B|C", "C:B|C", null)
  val arr2 = arr.map(_.replaceAll(null, "") )
  </code></pre>
  
  <p>This gives me a NullPointerExpection. What is the best way to do this?</p>