Catch a common null error.

Need a more general approach, but this one is handy to catch now.