[MPS] Added zero check to inverse & fix for any op to avoid segfault issue (#94551)
Fixes empty placeholder error in inverse op. Change to any op should also resolve previously seen segfaults
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94551
Approved by: https://github.com/kulinseth