code: public static boolean isValidLong(@Nullable final String longStr) {
          if (StringUtils.isBlank(longStr)) {
              return false;
          }
          final String stripedLong = StringUtils.strip(longStr);
          try {
              NumberUtils.createLong(stripedLong);
              return true;
          } catch (NumberFormatException e) {
              return false;
          }
      }
docs: Given a long integer string, it checks if it's a valid long integer (based on apaches NumberUtils.createLong)
  
  @param longStr the long integer string to check
  @return true if it's valid, otherwise false