When in Scala code null is passed it is a bug, thus I wouldn't react on that. On the other side, I have no idea if this method gets called from Java which could pass null.

Btw, instead of throwing an exception, one can just use `require(cond, "error")`. ;)