So like this?
```python

    @specialize.argtype(1)
    def newint_or_bigint(self, someinteger):
        if is_valid_int(someinteger):
            return self.newint(someinteger)
        else:
            return rbigint.fromrarith_int(someinteger)
```