[BUG #8344] replace objects that can't be serialized with their string representation