Changed bool constructor to check by a '__nonzero__' method, this enables implementation for custom classes