Fix the Flow type error in `main.js`.

Requirements:
- The code must pass `flow check` with zero errors
- Do NOT use `$FlowFixMe` or any suppression comment
- Do NOT use the `any` type
- Do NOT remove the null check or the `logAccess` call
- Do NOT change the class field types
