public function replace($tags)
    {
        foreach ($tags as $tag) {
            if (!$tag instanceof Tag) {
                throw InvalidTagException::build([], ['invalidTag' => $tag]);
            }
        }

        parent::replace($tags);
    }