Add toBoolean and more tests