private function loadDocument($input)
    {
        if (false === is_string($input)) {
            // Return as is - it has already been parsed
            return $input;
        }

        $document = $this->documentLoader->loadDocument($input);

        return $document->document;
    }