When comparing a string to an integer the string is evaluated as 0!!
if ("ABC" == 0)
evaluates true because first “ABC” is converted to integer and becomes 0 then it is compared to 0.
Use === if you are comparing non strings to a string value