Use isXRP() instead of isZero().

* Also clean up some logic.
* Short, but please check carefully.