Add null check after the initialization of each working unit.