I actually copied that over from ``check_type``. However, I made a few changes that would break code using the current ``check_type`` function, which why I duplicated that code. It would be out of the scope of this bug to modify the other middleware services that would be impacted by such a change. 

(Basically, ``check_type`` doesn't raise any error and will instead return a default value, where ``convert_to_type`` expects an error to be raised and doesn't want any arbitrary default values to be returned in case of a failure. )

However, I want to replace the old system once we have confirmation that this new filtering system works fine (once we have tested it with this SuperSearch service).