Remove possible null references