MessageName

InstanceOf::any[object]
yields False, if Class did not generate any. Otherwise, it yields True, if object was created by the class any or a child class of any.
TypeOf::any[class]
tests if class is of any.
This loads the package.
In[1]:=
Click for copyable input
We first define a simple class that uses InstanceOf to check the argument of a method.
In[2]:=
Click for copyable input
We can now test the method.
In[3]:=
Click for copyable input
Out[3]=
Out[3]=