code: public static boolean isUUID(String string) {
          try {
              if (string != null) {
                  UUID.fromString(string);
                  return true;
              } else {
                  return false;
              }
          } catch (IllegalArgumentException ex) {
              return false;
          }
      }
docs: Checks if a string is a valid UUID or not.
  
  @param string The UUID value.
  @return true if input is a valid UUID or false if input is empty or an invalid UUID format.