GLMDebug.ERROR("TaskUtils", "Tasks DO is null "+TaskUtils.taskDesc(t)+"\n"+e);
if (logger.isErrorEnabled()) { logger.error("Tasks DO is null " + TaskUtils.taskDesc(t) + "\n" + e); }
  public static boolean isDirectObjectOfType(Task t, String type) {    boolean result = false;    Asset asset = t.getDirectObject();    // Check for aggregate assets and grab the prototype    if (asset instanceof AggregateAsset) {      asset = ((AggregateAsset)asset).getAsset();    }    try {      SupplyClassPG pg = (SupplyClassPG)asset.searchForPropertyGroup(SupplyClassPG.class);      if (pg != null) {	result = type.equals(pg.getSupplyType());      }      else {	GLMDebug.DEBUG("TaskUtils", "No SupplyClassPG found on asset "+TaskUtils.taskDesc(t));      }    } catch (Exception e) {      GLMDebug.ERROR("TaskUtils", "Tasks DO is null "+TaskUtils.taskDesc(t)+"\n"+e);    }    return result;  }