simplify Mul.is_nonzero code