public function isValidTransformer($transformer): bool
    {
        if ($transformer instanceof TransformerInterface) {
            return true;
        }

        if (\is_callable($transformer)) {
            return true;
        }

        return false;
    }