[task] added null checks