Corrects forEach type check.