Revert "Revert "replace toString() with as boolean to address github issue #33""

This reverts commit 44ae2f79df4cfdef01d9236c95095aca09e63bc5.