code: function tryParse(data) {
    var json;
    try {
      json = JSON.parse(data);
    } catch (ex) { debug('tryParse exception %s for data %s', ex, data); }
  
    return json || data;
  }
docs: Try to parse a string as JSON, otherwise return the string