Better handle boolean values in traceback