Check that error is a string