Add a little more error checking to minifier (#103057)
Prompted by https://github.com/pytorch/pytorch/issues/101408
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/103057
Approved by: https://github.com/bdhirsh