Closure Compiler uses type annotations on variables and functions that give information on null and undefined. These annotations look like {?Object|undefined} (Object may be null or undefined) and {!Object} (object is guaranteed to not be null).
In Java, NullPointerExceptions is huge problem. IDEs have plugins to check for this error, but there is no standard solution.
Does Scala help in avoiding NullPointerExceptions? Do function signatures specify if a value may be null?