added validations to PackageDeclaration