Add a missing null check.