refactor bool conversion to avoid logging