Fixed minor nullref in PackageFromDoc