Avoid to dereference a NULL pointer.