public static OptionalInt optionalInteger(Inspector field) {
        return isPresent(field) ? OptionalInt.of((int) field.asLong()) : OptionalInt.empty();
    }
Throws {@link JsonParseException} on invalid JSON.
vespajlib/src/main/java/com/yahoo/slime/SlimeUtils.java