code: @FFDCIgnore(Exception.class)
      public boolean isEntityInRealm(String uniqueName) {
  
          if (isSafRegistry()) {
              try {
                  return userRegistry.isValidUser(uniqueName);
              } catch (Exception e) {
                  /* Ignore. */
              }
  
              try {
                  return userRegistry.isValidGroup(uniqueName);
              } catch (Exception e) {
                  /* Ignore. */
              }
          } else {
              try {
                  SearchResult result = userRegistry.getUsers(uniqueName, 1);
                  if (result != null && result.getList().size() > 0)
                      return true;
              } catch (Exception e) {
                  /* Ignore. */
              }
  
              try {
                  SearchResult result = userRegistry.getGroups(uniqueName, 1);
                  if (result != null && result.getList().size() > 0)
                      return true;
              } catch (Exception e) {
                  /* Ignore. */
              }
          }
  
          return false;
      }
docs: Is the entity in this realm?
  
  @param uniqueName The entity unique name.
  @return True if the entity is in the realm, false if the entity is not.