Uncooked grains and corn kernals are prone to several bacillus bacterial strains which can be fatal.
Cooking them makes them safe in almost all cases, as long as they reach the correct internal temperatures and stay hot for some time.
Even after cooking, if it tastes even a little wrong then toss it anyways.
Rolled Oats, Cut Oats, and Instant Oats are all steam treated and dried (I think…) which should remove any chance of contamination, but if they stay unsealed for a long time or are in contact with moisture or oils then it would carry some risks.