### 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
@Override
        public LogicalPlan apply(LogicalPlan logicalPlan, AnalyzerContext context) {
            List<LogicalPlan> limits = logicalPlan.collectFirstChildren(Limit.class::isInstance);
            var limit = limits.isEmpty() == false
                ? context.configuration().resultTruncationMaxSize() 
                : context.configuration().resultTruncationDefaultSize(); 
            return new Limit(Source.EMPTY, new Literal(Source.EMPTY, limit, DataTypes.INTEGER), logicalPlan);
        }
    }
    private static class PromoteStringsInDateComparisons extends Rule<LogicalPlan, LogicalPlan> {
        @Override
        public LogicalPlan apply(LogicalPlan plan) {
            return plan.transformExpressionsUp(BinaryComparison.class, PromoteStringsInDateComparisons::promote);
        }
        private static Expression promote(BinaryComparison cmp) {
            if (cmp.resolved() == false) {
                return cmp;
            }
            var left = cmp.left();
            var right = cmp.right();
            boolean modified = false;
            if (left.dataType() == DATETIME) {
                if (right.dataType() == KEYWORD && right.foldable()) {
                    right = stringToDate(right);
                    modified = true;
                }
            } else {