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