added test for existsBool method, fixed a bug in it