code: public static boolean available(String groupName, String unitName) {
          return LocalUnitsManager.getLocalUnit(groupName, unitName) != null ||
                  UnitDiscovery.singleton != null && UnitDiscovery.singleton.firstInstance(Unit.fullName(groupName, unitName)) != null;
      }
docs: check whether the specified unit is available.
  tips: don't use exception catching to get the result, cause this is bad performance.