I am working on a big angular project which consists of a lot of files. The null checks haven't been done consistently which results in the runtime error
Cannot read property propertyName' of undefined
It is required to be fixed. The usual way would be go through all lines of code and fix the potential instances of this issue by applying null checks. But it is going to be time intensive.
Is there a way to set Object prototype for entire project and handle this error centrally?