Let's say you have an object obj, and you would like to see if it is an instance of a SIDL class or interface whose fully qualified name is x.y.z. Here is how you do it.
import x.y.z
zobj = x.y.z.z(obj)
Of course, you don't need the import if you know that x.y.z has already been imported. If zobj is not equal to None, the cast was successful.