Enhanced boolean handling