code: function toStringSafe(str, defValue = '') {
      if (isNullOrUndefined(str)) {
          str = '';
      }
      str = '' + str;
      if ('' === str) {
          str = defValue;
      }
      return str;
  }
docs: Converts a value to a string that is NOT (null) or (undefined).
  
  @param {any} str The input value.
  @param {any} defValue The default value.
  
  @return {string} The output value.