Prevent a null pointer dereference.