Do not try to call .replace() on a number

When using range, for example, it makes sense to allow this type of syntax `.range(1, 10)` which is currently throwing a type error.