You can use isinstance(object, Class)
to test if any object
is instance of Class
.
So, in your example try this:
if notification.content_type:
if isinstance(notification.content_type, Person):
print "content_type is of Person class"