ClassQ

ClassQ[class]
returns True, if Class generated the class.
This loads the package.
In[1]:=
Click for copyable input
In order to get a positive check for ClassQ, we must first define a class.
In[2]:=
Click for copyable input
The class is now known to the system.
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=