Protect against null pointer crash.