BUG: fix incorrect TypeError raise
TypeError was being raised when a ValueError was raised because the 
ValueError's message wasn't being converted to a string.

closes #4956

looks good (assuming it passes)!
 merging
