Add tests for check_digit() error cases