Fix incompatiblity with type conversion and flags

Automatic type conversion uses the tobool function which threw an
exception when based a boolean object by command line flags.
Incompatablity fixed by having tobool not throw an exception.