Add missing null check