docs: function idx<Ti, Tv>(input: Ti, accessor: (input: Ti) => Tv): ?Tv {
    try {
      return accessor(input);
    } catch (error) {
      if (error instanceof TypeError) {
        if (nullPattern.test(error)) {
          return null;
        } else if (undefinedPattern.test(error)) {
          return undefined;
        }
      }
      throw error;
    }
  }