type (value, schema, opts) {
    let type = schema.type
    let validType
    // Can be one of several types
    if (utils.isString(type)) {
      type = [type]
    }
    // Try to match the value against an expected type
    type.forEach(function (_type) {
      // TODO: throw an error if type is not defined
      if (types[_type](value, schema, opts)) {
        // Matched a type
        validType = _type
        return false
      }
    })
    // Value did not match any expected type
    if (!validType) {
      return makeError(value !== undefined && value !== null ? typeof value : '' + value, `one of (${type.join(', ')})`, opts)
    }
    // Run keyword validators for matched type
    // http://json-schema.org/latest/json-schema-validation.html#anchor12
    const validator = typeGroupValidators[validType]
    if (validator) {
      return validator(value, schema, opts)
    }
  }
Validates the provided value's type is equal to the type, or array of types, defined in the Schema's `type` keyword.
see http://json-schema.org/latest/json-schema-validation.html#anchor79

@name Schema.validationKeywords.type
@method
@param {*} value Value to be validated.
@param {object} schema Schema containing the `type` keyword.
@param {object} [opts] Configuration options.
@returns {(array|undefined)} Array of errors or `undefined` if valid.