code: function(item) {
          if (item && Selectivity.isValidId(item.id) && isString(item.text)) {
              return item;
          } else {
              throw new Error('Item should have id (number or string) and text (string) properties');
          }
      }
docs: Validates a single item. Throws an exception if the item is invalid.
  
  @param item The item to validate.
  
  @return The validated item. May differ from the input item.