code: function parseIfJson(val) {
      if (_.isString(val)) {
          val = val.trim();
          if (val.substring(0, 1) === '{' && val.substring(val.length - 1) === '}') {
              try {
                  val = JSON.parse(val);
              }
              catch (ex) {
                  /* eslint no-console:0 */
                  console.log(ex);
              }
          }
      }
      return val;
  }
docs: If a value is a string of json, parse it out into an object
  @param val
  @returns {*}