whole_func_string: function ensureDefault(val, def) {
      if ((util_1.isNullOrUndefined(val) || val === '') && !chek_1.isUndefined(def))
          return def;
      return val;
  }
func_code_string: function ensureDefault(val, def) {
      if ((util_1.isNullOrUndefined(val) || val === '') && !chek_1.isUndefined(def))
          return def;
      return val;
  }
func_documentation_string: Ensures a default value when current is undefined.
  
  @param val the current value.
  @param def the default value.