Make to_bool recognize 0 and 1
Merge pull request #24 from sils1297/bug23

Make to_bool recognize 0 and 1