protected function validateObject($element) { if (!$element instanceof SitemapAware) { throw new \InvalidArgumentException("Element should implement Calotype\\SEO\\Contracts\\SitemapAware"); } }