Improve exception handling in null case.