Add a parseBoolean function

This implements and closes #325, unless more features are wanted.