Hi Dan, thanks for the question!
The answer is that runtime execution should be invoking the error event handling configured in the flow if it encounters this situation as the string is not convertible.
Upon initial investigation of your question above, the issue you've found here appears to be specific to call flows and not inbound email flows where execution would invoke the flow's error handling as expected.
We have created a development ticket internally to investigate this further and correct the call flow runtime behavior in this case.
The following expression could be used to provide a *basic* check to see if a string looks like a good candidate to be converted to an integer value. In the example below, the assumption is that the string to convert to an integer is stored in a variable called Task.StringToConvert. What the expression does is check to make sure that there's a value in Task.StringToConvert, trims it, replaces characters that are valid for conversion to an integer with blanks and checks to see if the resulting string after all blank replacements have been made has a length of 0. If that's the case, then it would call ToInt on Task.StringToConvert. If for some reason there were still characters hanging around after all those replace calls were made which would be the case when Task.StringToConvert is "blocked", then it would return a default integer value. That default value is the ", 0)" at the very end of the expression. Here you go:
If(IsSet(Task.StringToConvert) and Length(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Trim(Task.StringToConvert),"0",""),"1",""),"2",""),"3",""),"4",""),"5",""),"6",""),"7",""),"8",""),"9",""),"-",""))==0, ToInt(Task.StringToConvert), 0)
I hope this helps.
Jim
Note: I wasn't sure if "blocked" was an arbitrary value but if you're dealing with a phone number like from Call.Ani or the Call.CalledAddress variables, we do have this helpful page regarding the phone number data type ( https://help.mypurecloud.com/articles/about-the-phone-number-data-type/ ) which provides helpful properties for getting at pieces of data from a phone number.