> But for integer? Is a non-existing integer smaller than 0?

You can use `String#to_i`. Non-existing integer is equal to 0.