Updated null pointer exception handler (#209)