### 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
attribute = new UnsupportedAttribute(source, name, uef);
                    } else {
                        attribute = new FieldAttribute(source, null, name, t);
                    }
                    list.add(attribute);
                }
                
                if (type != NESTED && fieldProperties.isEmpty() == false) {
                    mappingAsAttributes(list, source, name, fieldProperties);
                }
            }
        }
    }
    private static class ResolveEnrich extends ParameterizedAnalyzerRule<Enrich, AnalyzerContext> {
        @Override
        protected LogicalPlan rule(Enrich plan, AnalyzerContext context) {
            if (plan.policyName().resolved() == false) {
                
                return plan;
            }
            String policyName = (String) plan.policyName().fold();
            EnrichPolicyResolution policyRes = context.enrichResolution()
                .resolvedPolicies()
                .stream()
                .filter(x -> x.policyName().equals(policyName))
                .findFirst()
                .orElse(new EnrichPolicyResolution(policyName, null, null));
            IndexResolution idx = policyRes.index();
            EnrichPolicy policy = policyRes.policy();
            var policyNameExp = policy == null || idx == null