code: function findType (type) {
    let name = ''
    const defaultTypes = [
      'string',
      'number',
      'boolean',
      'symbol',
      'array',
      'object'
    ]
  
    try {
      name = type.prototype.constructor.name.toLowerCase()
    } catch (err) {}
  
    if (defaultTypes.includes(name)) {
      return types[name]()
    }
  
    return value => {
      if (!(value instanceof type)) {
        throw new Error(`is not instance of ${type.prototype.constructor.name}`)
      }
  
      return true
    }
  }
docs: Find validator fucntion for a type
  @param  {Function} type
  @return {Function}