code: private void maybeRunValidityCheck(String passName, Node externs, Node root) {
      if (validityCheck == null) {
        return;
      }
      try {
        validityCheck.create(compiler).process(externs, root);
        changeVerifier.checkRecordedChanges(passName, jsRoot);
      } catch (Exception e) {
        throw new IllegalStateException("Validity checks failed for pass: " + passName, e);
      }
    }
docs: Runs the validity check if it is available.