You should not use nullScala at all, and if you do not, there is no need to use a tag NotNull.
If you have values or variables that may have “no value,” use a type Optioninstead of a value null. Optionhas two subclasses: Someand None.
var text: Option[String] = None
text = Some("Hello World")
Option ; ( ) , , .
text match {
case Some(s) => println("Text: " + s)
case None => println("Empty")
}