Fix number casting
The == comparison was converting the result and giving a false positive on the tests.