[OpenMP] Fixup while loops to avoid bad NULL check (#83302)

GitOrigin-RevId: 9b1c496898cbefdce74eb1cf1a0911eb3230d65b
2 files changed