tasks: added validation to prevent adding nil workers