Fixed null check in Duty.