If the seeds have reached the sweet corn stage, then I expect them to be fully viable, albeit not fully mature. Corn seed becomes viable around 17 days after pollination, which is about a week prior to sweet corn stage.
A hard freeze risks damaging the seeds. I concur with Phil's suggestion of harvesting the day before a hard freeze is expected. Animals can abscond with the seeds (coons, birds,
mice, grasshoppers, kids). Rain can damage seeds, causing them to germinate or mold. If those sorts of issues are imminent, I'd choose to harvest earlier rather than later.