code: function(val){
     if(typeof val === "undefined" || val === null){
        return "";
     }
     else if(val === true){
        return "1";
     }
     else if(val === false){
        return "0";
     }
     else if(typeof val === "string"){
        return val;
     }
     else if(!isNaN(val)){
        return String(val) + "";
     }
     else if(typeof val === "object"){
        return JSON.stringify(val) + "";
     }
     else if(Array.isArray(val)){
        return JSON.stringify(val) + "";
     }
     return "";
  }
docs: Helper: Convert value to some senseful string representation for storage