public function isType($type) { if ($this->has(strtolower($type))) { return true; } return $this->detectType() === $type; }