public function setCreated($val)
	{
		if (($val instanceof \DateTime)) {
			$this->created = $val;
		}
		else if (is_string($val) && !empty($val)) {
			try {
				// There can be accidentaly exeption thrown whenever the given
				// string is not valid date.
				$this->created = new \DateTime($val);
			} catch(\Exception $e) {
				$this->created = null;
			}
		}
		else {
			$this->created = null;
		}

		return $this;
	}