Adobe error.
string.toString() does odd things with nulls. Use serializeJSON, but also account for complex values.