Cast error messages to strings