If there's a property in my schema like:
"date_filter": {
"type": "string",
"format": "date",
"nullable": true
}
... and I leave it blank, what gets submitted is null, which then fails validation for not being a string.
I think you want to change this line to:
trimmed_data = data or ""
so that null gets converted to an empty string. Either that or moving the if is_empty check above the type check for string.