check_bit: use assertion