cast bool logic to bool type