As a Scala developer you may safely assume
null doesn’t exist, if you have an optional parameter you will use
The only moment you need yo care about
null is when interacting with a Java library, in such case immediately wrap in
Options everything that may be nullable, so you can again forget about that.
In any Scala code if you ask for some type, e.g.
String, you are free to assume it won’t be
And if someone passes a
null and the code breaks is their fault, not yours; using
null in Scala is a bad practice and whoever follows bad practices is expecting to have a bad time.
Yeah, do not check for
null unless you are interacting with Java.