(PE-3599) More tolerant boolean conversion function