In Objective C, for example, both the generic Object and NSObject (in Cocoa/OpenStep) provide the method isMemberOfClass: which returns true if the argument to the method is an instance of the specified class. The method isKindOfClass: analogously returns true if the argument inherits from the specified class.
For example, say we have a Puppy and Kitten class inheriting from Animal, and a Vet class.
In these languages, subtyping polymorphism (sometimes referred to as dynamic polymorphism or dynamic typing) allows a function to be written to take an object of a certain type T, but also work correctly if passed an object that belongs to a type S that is a subtype of T (according to the Liskov substitution principle).
This type of polymorphism is common in object-oriented programming languages, many of which allow operators to be overloaded in a manner similar to functions (see operator overloading).
For instance, it is usually possible to convert a value of a floating-point numeric type into a value of integer type with a rounding operation, or to convert an integer to a string using a function that constructs the integer's decimal representation.
For example, you can't directly subclass the dictionary type, and the introspection interface for finding out what methods and instance variables an object has is different for types and for classes.
The class-based introspection API is used primarily for class instances; it is also used by Jim Fulton's ExtensionClasses.
The type API is sometimes combined with a __dict__ that works the same as for instances (for example for function objects in Python 2.1, f.__dict__ contains f's dynamic attributes, while f.__members__ lists the names of f's statically defined attributes).