### Elasticsearch Version

8.11.0

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

MacOS

### Problem Description

When sending a ESQL query with the `enrich` command that involves a policy that does not existing a `NullPointerException` is thrown and shown as error messages to the user:

Query:
```
row a  = 1| enrich missing-policy
```

Returns:
```
null_pointer_exception - Cannot invoke "org.elasticsearch.xpack.core.enrich.EnrichPolicy.getMatchField()" because "policy" is null
```

### Steps to Reproduce

See above.

### Logs (if relevant)

_No response_
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/analysis/Analyzer.java
}
                }
            });
            
            projections.addAll(unresolved);
            return new EsqlProject(rename.source(), rename.child(), projections);
        }
        private LogicalPlan resolveEnrich(Enrich enrich, List<Attribute> childrenOutput) {
            if (enrich.matchField().toAttribute() instanceof UnresolvedAttribute ua) {
                Attribute resolved = maybeResolveAttribute(ua, childrenOutput);
                if (resolved.equals(ua)) {
                    return enrich;
                }
                if (resolved.resolved() && resolved.dataType() != KEYWORD) {
                    resolved = ua.withUnresolvedMessage(
                        "Unsupported type ["
                            + resolved.dataType()
                            + "]  for enrich matching field ["
                            + ua.name()
                            + "]; only KEYWORD allowed"
                    );
                }
                return new Enrich(enrich.source(), enrich.child(), enrich.policyName(), resolved, enrich.policy(), enrich.enrichFields());
            }
            return enrich;
        }
    }
    private static List<Attribute> resolveAgainstList(UnresolvedAttribute u, Collection<Attribute> attrList) {
        var matches = AnalyzerRules.maybeResolveAgainstList(u, attrList, false, true, Analyzer::handleSpecialFields);