Use the isCompleted method to determine if the task is completed.