code: private static String getJsonValueAsString(JsonValue value) {
          return (value != null && value.getValueType() == ValueType.STRING) ? ((JsonString) value).getString() : null;
      }
docs: Returns the specified JsonValue as a String, or null if it's not a string