That’s why I suggested to use the error file and construct a solution that will write the errors elsewhere. You can try and use the instanceof or typeof operators in the filter:
$a instanceof Number
typeof $a == ‘number’
Or modify your actual expression:
isNaN(parseInt($a)) == true
What you were trying so far is not working because you are checking if the $a field is NaN. NaN is a response if you’re trying to parse a value that is Not a Number - NaN. That’s why you need to try and parse the value, than if the value is string or date or whatever, than you’ll get ‘NaN’ and your expression will be true. But be careful, the string numbers will also be affected, that’s why you should probably go with the operators above.