code: function validateTask(task) {
    if (typeof task === 'function') {
      return task;
    }
  
    if (typeof task.command !== 'string') {
      return;
    }
  
    if (task.options === null) {
      return;
    }
  
    if (task.options && typeof task.options !== 'object') {
      return;
    }
  
    return task;
  }
docs: Performs basic validation on a task:
  1. `command` property exists and is a string.
  2. `options` property is an object.
  
  @method validateTasks
  @param {Object} task