Use type check for also `is_not` (#113859)
Handle `is_not` for:
https://github.com/pytorch/pytorch/blob/9647a251cb760bffb08a7f5453e92220d0649629/torch/_dynamo/variables/builtin.py#L1314-L1317
I noticed https://github.com/pytorch/pytorch/issues/111713 exists, I think it's no harm to land this first.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/113859
Approved by: https://github.com/Skylion007