Filter parameters should be of type str. Fixes #10076. (cherry picked from commit adb4883291159298781144706fa5bc6331870ef2)