docs: public static int getIntValue(Object newValue, int defaultValue) {
          if (newValue != null) {
              if (newValue instanceof String) {
                  try {
                      return Integer.parseInt((String) newValue);
                  } catch (NumberFormatException ex) {
                  }
              } else if (newValue instanceof Integer)
                  return (Integer) newValue;
          }
  
          return defaultValue;
      }