docs: function getTypeClass(type) {
    switch (type) {
      case String:
        return types.String;
      case Number:
        return types.Number;
      case Date:
        return types.Date;
      case Boolean:
        return types.Boolean;
      case Buffer:
        return types.Buffer;
    }
  
    if (typeof type === 'string') return types[type];
  
    for (const ii in types) {
      if (types[ii] === type) return types[ii];
    }
    return null;
  }