code: public static int toInteger(@Nullable final String integerStr) {
          if (!isValidInt(integerStr)) {
              throw new IllegalArgumentException(integerStr + ExceptionValues.EXCEPTION_DELIMITER + ExceptionValues.INVALID_INTEGER_VALUE);
          }
          final String stripedInteger = StringUtils.strip(integerStr);
          return NumberUtils.createInteger(stripedInteger);
      }
docs: Given an integer string if it's a valid int (see isValidInt) it converts it into an integer otherwise it throws an exception
  
  @param integerStr the integer to convert
  @return the integer value of the integerStr
  @throws IllegalArgumentException if the passed integer string is not a valid integer