fixing the input string value to jsonstring if the object is already a string, since then we end up adding extra quotation marks.