Adding support for basic type bool.

Something I found while writing tests, worthy of an independent pull request?