/**
  * get Message type OBJECT
  *
  * If an attempt to get the corresponding message type object fails, then we set this message
  * template group to inactive, and save to db.  Then return null so client code can handle
  * appropriately.
  *
  * @throws EE_Error
  * @return EE_message_type|false if exception thrown.
  */
 public function message_type_obj()
 {
     $message_type = $this->message_type();
     EE_Registry::instance()->load_helper('MSG_Template');
     try {
         $message_type = EEH_MSG_Template::message_type_obj($message_type);
     } catch (EE_Error $e) {
         //if an exception was thrown then let's deactivate this message template group because it means there is no class for the message type in this group.
         $this->set('MTP_is_active', false);
         $this->save();
         return null;
     }
     return $message_type;
 }
 /**
  * get Message type OBJECT
  *
  * @return EE_message_type
  */
 public function message_type_obj()
 {
     $message_type = $this->message_type();
     EE_Registry::instance()->load_helper('MSG_Template');
     return EEH_MSG_Template::message_type_obj($message_type);
 }