public static boolean emptyTermP(Stella_Object self) {
    { Surrogate testValue000 = Stella_Object.safePrimaryType(self);

      if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_LOGIC_OBJECT)) {
        { LogicObject self000 = ((LogicObject)(self));

          return (LogicObject.cheapEmptyTermP(self000) ||
              LogicObject.expensiveEmptyTermP(self000));
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_STELLA_COLLECTION)) {
        { Collection self000 = ((Collection)(self));

          return (self000.length() == 0);
        }
      }
      else {
        return (false);
      }
    }
  }