fixing null check in task executor