Read through this thread. @hmwillett explains creating a function to do this kind of thing. That way you call the function to do the conversion when comparing Strings and Integers.
But even with the function, there was some good troubleshooting in this thread to find a solution. Hopefully something in here should get you in the right direction.