Sanic-ext validate optional field not working

Calling the API with query params ex: ?q=12345
will raise 400 error. without query params is fine

Here’s the sample code

from dataclasses import dataclass, asdict
from typing import Optional

from sanic import Sanic
from sanic.response import json
from sanic_ext import validate


app = Sanic("Sanic-APP")


@dataclass
class SearchParams:
    q: Optional[str] = None


@app.route("/")
@validate(query=SearchParams)
async def handler(request, query: SearchParams):
    return json(asdict(query))

Sanic version 22.6.0
Sanic-ext version 22.6.1

I tried to debug and found the error on this line

https://github.com/sanic-org/sanic-ext/blob/4a6dda9d5c28cfad0988b90a77cb031708a487b3/sanic_ext/extras/validation/check.py#L147

error caused due to have allowed value

Hint(hint=<class 'str'>, model=False, literal=False, typed=False, nullable=False, origin=None, allowed=(), allow_missing=False

Full schema

schema={'SearchParams': {'sig': <Signature (q: Optional[str] = None) -> None>, 'hints': {'q': Hint(hint=typing.Optional[str], model=False, literal=False, typed=True, nullable=True, origin=typing.Union, allowed=(Hint(hint=<class 'str'>, model=False, literal=False, typed=False, nullable=False, origin=None, allowed=(), allow_missing=False),), allow_missing=False)}}}, allow_multiple=True, allow_coerce=True)

Did I miss something on define the optional dataclass ?