export default function getFilterValue(filterValues: ReadonlyArray, val: string | Array | undefined): FilterType | undefined { if (typeof val === 'string' && filterValues.includes(val as FilterType)) { return val as FilterType; } }