more test coverage on emitIf none dispatch (#16794)
Summary:
Follow up of #14533, add more test coverage for emitif metaprogramming conditions. Also delete some unwrap optional usage.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16794
Differential Revision: D14096868
Pulled By: wanchaol
fbshipit-source-id: ee1cec609c58d0dd65211249a90207be06649e71