Only cast to an int for nils

This prevents monetary nodes being rounded to pounds.
hermod 1.2.7

* Only cast to an int for nils.