code: function save(storage, name, value) {
        try {
          var key = propsPrefix + name;
          if (value == null) value = '';
          storage[key] = value;
        } catch (err) {
          console.log('Cannot access local/session storage:', err);
        }
      }
docs: Note: LocalStorage converts the value to string We are using empty string as a marker for null/undefined values.