Properly stringify non-objects and non-arrays.