Avoid segv when data read is not a string