This post says
It may be a pain to see compile errors, but trust me, getting error here is good for you. You did something stupid you tried to compare string with int and decide which one is equal. This does not make any sense to the computer most of the time (nor does it make sense to human), so you should never be able to run program like this. Computer says “No!” and you have to cope with that.
In which, “decide which one is equal” seems to be not grammatical, is this one more appropriate, “check if the two are equal”?
This is not a question of grammar (The implicit rules that govern how words get put together in a language) but a question of meaning. There are grammatical sentences that have no meaning at all, such as Chomsky’s example “Colourless green ideas sleep furiously.”
You are right that “decide which one is equal” doesn’t have a clear meaning as equality requires at least two things, but also you are right that “check if the two are equal” is probably the intended phrase.