Check if IMPORT_DISABLED_TESTS is set (#83436)
I just realize that some tests, i.e. MAC MPS https://github.com/pytorch/pytorch/runs/7842997537?check_suite_focus=true, doesn't have this IMPORT_DISABLED_TESTS set. Thus, it can be None
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83436
Approved by: https://github.com/clee2000