Fix runtime error on non-string data