Searching on a filter for categorical values fails and throws 500 Server Error

Running Metabase enterprise v39.5.

Trying to search for values to filter a dashboard on yields no results when typing in the filter box. It should get should give back results. Looking at the API calls (listed below) it throwing 500 internal error when I search for values to filter on

API call /api/dashboard/:id/params/:param-key/search/:query returns
"via": [
"type": "java.lang.NullPointerException"
"trace": [],
"message": null
with no additional logs, I can't seem to see what the issue

The corresponding API call /api/dashboard/:id/params/:param-key/values works perfectly and returns expected results. I do see one of the values being a null so not sure if that is the issue.

Found new logs which may help debug the issue:
GET /api/dashboard/3/params/f3679281/search/Cam 500 32.5 ms (29 DB calls)
{:via [{:type java.lang.NullPointerException, :at [clojure.string$lower_case invokeStatic "string.clj" 217]}],
[[clojure.string$lower_case invokeStatic "string.clj" 217]
[clojure.string$lower_case invoke "string.clj" 213]
[metabase.models.params.chain_filter$cached_field_values_search$fn__70604 invoke "chain_filter.clj" 619]
[clojure.core$filter$fn__5893 invoke "core.clj" 2817]
[clojure.lang.LazySeq sval "" 42]
[clojure.lang.LazySeq seq "" 51]
[clojure.lang.RT seq "" 535]
[clojure.core$seq__5402 invokeStatic "core.clj" 137]
[clojure.core$take$fn__5909 invoke "core.clj" 2884]
[clojure.lang.LazySeq sval "" 42]
[clojure.lang.LazySeq seq "" 58]
[clojure.lang.RT seq "" 535]
[clojure.core$seq__5402 invokeStatic "core.clj" 137]
[clojure.core$concat$cat__5495$fn__5496 invoke "core.clj" 734]
[clojure.lang.LazySeq sval "" 42]
[clojure.lang.LazySeq seq "" 51]
[clojure.lang.RT seq "" 535]
[clojure.lang.RT nthFrom "" 981]
[clojure.lang.RT nth "" 940]
[clojure.core$distinct$step__6413$fn__6414$fn__6416 invoke "core.clj" 5048]
[clojure.core$distinct$step__6413$fn__6414 invoke "core.clj" 5048]
[clojure.lang.LazySeq sval "" 42]
[clojure.lang.LazySeq seq "" 51]
[clojure.lang.LazySeq first "" 73]
[clojure.lang.RT first "" 692]
[clojure.core$first__5384 invokeStatic "core.clj" 55]
[clojure.core$first__5384 invoke "core.clj" 55]
[metabase.api.dashboard$fn__71144$chain_filter__71153$fn__71156 invoke "dashboard.clj" 560]
[metabase.api.dashboard$fn__71144$chain_filter__71153 invoke "dashboard.clj" 526]
[metabase.api.dashboard$fn__71182 invokeStatic "dashboard.clj" 589]
[metabase.api.dashboard$fn__71182 invoke "dashboard.clj" 578]
[compojure.core$wrap_response$fn__12050 invoke "core.clj" 160]
[compojure.core$wrap_route_middleware$fn__12034 invoke "core.clj" 132]

Hi @chalenge
Please use the support email if using the Enterprise Edition.
Include the output of /api/field/123, where 123 is your field ID, which you can find in Admin > Data Model > (db) > (table) > (column) :gear:, and look in the URL.

It is unclear if you are using Linked Filters.
Does this only happen for that field?
If you create a new dashboard with filters, do it also happen there?