Remove possible null pointer dereference