Defend against a NPE in the error handler.