fix #1241

perform stringify only if type is not string