anchor.diff:      if (node is UnknownType) {
         // Note: we can't pass [node] to [problem] because it's not a [TreeNode].
         problem(null, "Unexpected appearance of the unknown type.");
  +    }
  +    bool neverLegacy = isNullType(node) ||
  +        node is DynamicType ||
  +        node is InvalidType ||
  +        node is VoidType ||
  +        node is NeverType ||
  +        node is BottomType;
  +    bool expectedLegacy =
  +        !currentLibrary.isNonNullableByDefault && !neverLegacy;
  +    if (expectedLegacy && node.nullability != Nullability.legacy) {
  +      problem(
  +          null, "Found a non-legacy type '${node}' in an opted-out library.");
  +    }
  +    Nullability nodeNullability =
  +        node is InvalidType ? Nullability.undetermined : node.nullability;
  +    if (currentLibrary.isNonNullableByDefault &&
  +        nodeNullability == Nullability.legacy) {
  +      problem(null, "Found a legacy type '${node}' in an opted-in library.");
       }
       super.defaultDartType(node);
     }
  
positive.code: 
    @override
    visitInterfaceType(InterfaceType node) {
      Uri importUri = node.classNode.enclosingLibrary.importUri;
      if (node.classNode.name == "Null" &&
          importUri.scheme == "dart" &&
          importUri.path == "core" &&
          node.nullability != Nullability.nullable) {
        problem(null, "Found a not nullable Null type: ${node}");
      }
      super.visitInterfaceType(node);
  
negative.code: import 'package:kernel/ast.dart'
      show
          AsExpression,
          BottomType,
          Class,
          Component,
          DartType,
          DynamicType,
          ExpressionStatement,
          Field,
          FunctionType,
          InterfaceType,
          InvalidType,
          Library,
          Member,
          NeverType,
          Nullability,
          Procedure,
          StaticInvocation,
  