### Elasticsearch Version

8.11.0

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

MacOS

### Problem Description

I would expect a clear message for the following ES|QL query:

```
from index | where 1 year
```

But what I get is:

```
[esql] > Unexpected error from Elasticsearch: illegal_argument_exception - Unrecognized class type class java.time.Period
```

### Steps to Reproduce

See above.

### Logs (if relevant)

_No response_
x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java
public void testUnsignedLongNegation() {
        assertEquals(
            "1:29: negation unsupported for arguments of type [unsigned_long] in expression [-x]",
            error("row x = to_ul(1) | eval y = -x")
        );
    }
    public void testSumOnDate() {
        assertEquals(
            "1:19: argument of [sum(hire_date)] must be [numeric], found value [hire_date] type [datetime]",
            error("from test | stats sum(hire_date)")
        );
    }
    public void testWrongInputParam() {
        assertEquals(
            "1:19: first argument of [emp_no == ?] is [numeric] so second argument must also be [numeric] but was [keyword]",
            error("from test | where emp_no == ?", "foo")
        );
        assertEquals(
            "1:19: first argument of [emp_no == ?] is [numeric] so second argument must also be [numeric] but was [null]",
            error("from test | where emp_no == ?", new Object[] { null })
        );
    }
    public void testPeriodAndDurationInRowAssignment() {
        for (var unit : List.of("millisecond", "second", "minute", "hour", "day", "week", "month", "year")) {
            assertEquals("1:5: cannot use [1 " + unit + "] directly in a row assignment", error("row a = 1 " + unit));
        }
    }
    public void testSubtractDateTimeFromTemporal() {
        for (var unit : List.of("millisecond", "second", "minute", "hour")) {
            assertEquals(