Its bad practice in Python to depend explicitly on the specific type. You should implement your algorithm such that it does not matter if the type is exactly a Sage integer or just something that behaves like an integer:
try:
... do something ...
except ValueError:
... not an integer? ...
The second-best solution is to see if it is something that can be converted into ZZ:
sage: 5 in ZZ
True
sage: 5/2 in ZZ
False
The worst solution is to look directly at the type:
sage: isinstance(5, sage.rings.integer.Integer)
True