Turning on strict setting in tsc showed we had many assumptions about data which may not hold true.
A lot of code accesses possibly undefined objects, or assumes arrays are of certain size without any checks.
We should add proper checks before accessing possibly undefined data.