if (milTask == null) { return; }
  public void disposeOfUnusedMILTask(Inventory inventory, boolean noRefills) {    if (noRefills) {      Task milTask = detReqHandler.findOrMakeMILTask(inventory,                                                     aggMILSubscription);      PlanElement pe = milTask.getPlanElement();      // If the PlanElement is already a Disposition then do nothing      if (!(pe instanceof Disposition)) {        // If the PlanElement is not null then it is an expansion.          // Only Remove expansion if there is nothing in the workflow.        if (pe instanceof Expansion) {          Enumeration tasks = ((Expansion)pe).getWorkflow().getTasks();          if (!tasks.hasMoreElements()) {            publishRemove(pe);            pe = null;          }        }        if (pe == null) {          // Create Disposition          AllocationResultHelper helper = new AllocationResultHelper(milTask, null);          AllocationResult dispAR = helper.getAllocationResult(1.0, true);          Disposition disposition =            getPlanningFactory().createDisposition(milTask.getPlan(), milTask, dispAR);          publishAdd(disposition);        }      }    }  }