[Truffle] Use BigInteger.equals(o) over BigInteger.compareTo(o) == 0.

* Fix a couple types along the way.