### 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/test/java/org/elasticsearch/xpack/esql/analysis/AnalyzerTests.java
public void testUnsupportedTypesWithToString() {
        
        final String supportedTypes = "boolean, datetime, double, integer, ip, keyword, long, text, unsigned_long or version";
        verifyUnsupported(
            "row period = 1 year | eval to_string(period)",
            "line 1:28: argument of [to_string(period)] must be [" + supportedTypes + "], found value [period] type [date_period]"
        );
        verifyUnsupported(
            "row duration = 1 hour | eval to_string(duration)",
            "line 1:30: argument of [to_string(duration)] must be [" + supportedTypes + "], found value [duration] type [time_duration]"
        );
        verifyUnsupported("from test | eval to_string(point)", "line 1:28: Cannot use field [point] with unsupported type [geo_point]");
    }
    public void testNonExistingEnrichPolicy() {
        var e = expectThrows(VerificationException.class, () -> analyze("""
            from test
            | enrich foo on bar
            """));
        assertThat(e.getMessage(), containsString("unresolved enrich policy [foo]"));
    }
    public void testNonExistingEnrichPolicyWithSimilarName() {
        var e = expectThrows(VerificationException.class, () -> analyze("""
            from test
            | enrich language on bar
            """));
        assertThat(e.getMessage(), containsString("unresolved enrich policy [language], did you mean [languages]"));
    }
    public void testEnrichPolicyMatchFieldName() {
        verifyUnsupported("from test | enrich languages on bar", "Unknown column [bar]");
        verifyUnsupported("from test | enrich languages on keywords", "Unknown column [keywords], did you mean [keyword]?");