Allows validation with required package.json.

For the extension registry, we want package.json to be required.
With this change, the validation code allows optional checking for package.json.