Isn't the above made simpler by this:
```
if (x.is_real or x.is_imaginary) and (y.is_real or y.is_imaginary):
```