added Var::isBoolean() and fixed JSON stringifier