code: private static boolean isEmptyOrAllRealm(String realm) {
          if (realm == null || realm.trim().isEmpty() || realm.trim().equals("*")) {
              return true;
          } else {
              return false;
          }
      }
docs: Is the realm empty or * to denote any realm.