How boolean operators work on null in fifteen different languages.
uswaretech.com
uswaretech.com
Scala, Java, and Javascript all have a difference between undefined and null. The author doesn't go into this detail. He also doesn't differentiate between a runtime error and a compile-time error.
If you do the same test with Haskell's undefined, then all the expressions throw a runtime exception.
Haskell and SML really have the approach that has a strong foundation. The inconsistencies across languages are due to them not sharing the same foundation.