I would usually check for whether the class has the member we need, rather than explicitly looking for whether it is an instance of a particular type.