code: public static Integer getIntValue(Map<String, Object> yamlObject, String key, boolean allowsEmpty)
              throws YamlConvertException {
          Object obj = getObjectValue(yamlObject, key, allowsEmpty);
          if (obj == null && allowsEmpty) {
              return null;
          }
          String objStr;
          if (obj == null) {
              objStr = null;
          } else {
              objStr = obj.toString();
          }
          try {
              return new Integer(objStr);
          } catch (NumberFormatException e) {
              throw new YamlConvertException(String.format(MSG_VALUE_NOT_INT, key, objStr));
          }
      }
docs: if allowsEmpty, returns null for the case no key entry or null value