/**
  * Returns true if the <i>$object</i> has the right data type assigned in 
  * the construct, otherwise false.
  * 
  * @param mixed $object
  * @return boolean
  */
 public function isValidType($object)
 {
     if ($this->type == null || $object == null) {
         return true;
     }
     if (is_object($object) && get_class($object) == $this->type) {
         return true;
     }
     return MDataType::getType($object) == $this->type;
 }
 /**
  * Set the debug mode.
  * 
  * @param bool $bool
  */
 public static function setIsDebug($bool)
 {
     MDataType::mustBe(array(MDataType::BOOLEAN));
     MSession::set(MCoreApplication::DEBUG, $bool);
 }