add bool type support (issue #32)
strengthen consistency check used in test suite