docs: function(task, option) {
  
    // Code reuse!
    var toMsg = function(propertyName) {
      return 'Invalid task ' + propertyName + ':' +
        ' task.path=' + task.path + ' ' + pp(option);
    };
  
    // Validate name.
    if (typeof option.name !== 'string') {
      throw new TypeError(toMsg('name'));
    }
  
    // Validate alias.
    if (typeof option.alias !== 'string' && option.alias !== null) {
      throw new TypeError(toMsg('alias'));
    }
  
    // Validate kind.
    if (typeof option.kind !== 'string') {
      throw new TypeError(toMsg('kind'));
    }
  
    // Validate description.
    if (typeof option.description !== 'string') {
      throw new TypeError(toMsg('description'));
    }
  
    // Validate object keys.
    _.each(Object.keys(option), function(key) {
      if (!_.contains(validOptionKeys, key)) {
        throw new TypeError('Invalid task option property: ' +
          'key=' + key + ' ' + pp(task));
      }
    });
  
  }