The ToolTalk service provides a simple function to test if a given ptype is already registered in the current session.
tt_ptype_exists(const char *ptid)
where ptid is the identifier of the session to test for registration.