protected function getRelationMappedMorphClass($type)
    {
        $map = Relation::morphMap();

        if (empty($map)) {
            return $type;
        }

        return array_get($map, $type, ltrim($type, '\\'));
    }