Improve check in substitutableSubpattern.integerRange() for name that cannot be coerced to string