Converts valid a LogicValue to an int.
Throws an Exception if not isValid.
Exception
BigInt toBigInt();