This is not the way to do this. You can do `other = sympify(other)`, and then check `other.is_Number`. Probably you really want `is_Integer`, though (Number also includes stuff like Rational, Float, and `pi`).