DirectlyObjectQ

DirectlyObjectQ[object]
checks, if object was generated by New.
This loads the package.
In[1]:=
Click for copyable input
First, we create a simple class.
In[2]:=
Click for copyable input
Now, we generate an object.
In[3]:=
Click for copyable input
From now on, the object is known. DirectlyObjectQ does not evaluate its first argument and therefore only recognizes an object directly given.
In[4]:=
Click for copyable input
Out[4]=
Out[4]=
Any other expression, any class included, is not an object.
In[5]:=
Click for copyable input
Out[5]=
Out[5]=