make SwitchTransform return True/False as result when Python objects are requested instead of crashing when trying to cast bint values to PyObject*