protected function hydrateTags($tags, bool $createMissing = false): Collection
    {
        $tags = static::prepareTags($tags);
        $isTagsStringBased = static::isTagsStringBased($tags);
        $isTagsIntBased = static::isTagsIntBased($tags);
        $field = $isTagsStringBased ? 'slug' : 'id';
        $className = static::getTagClassName();

        if ($isTagsStringBased && $createMissing) {
            return $className::findManyByNameOrCreate($tags);
        }

        return $isTagsStringBased || $isTagsIntBased ? $className::query()->whereIn($field, (array) $tags)->get() : collect($tags);
    }