public function find($element, $resolve = true)
    {
        $result = null;

        if (is_object($element)) {
            $element = (string) $element;
        }

        if ($resolve && is_string($element)) {
            $result = $this->getResolver()->resolve($element, $this);
        }

        if (null === $result && is_scalar($element)) {
            $result = $this->get($element);
        }

        return $result;
    }