code: public JsonObject optJsonObject(String name) {
          JsonElement el = null;
          try {
              el = get(name);
          } catch (JsonException e) {
              return null;
          }
          if (!el.isJsonObject()) {
              return null;
          }
          return el.asJsonObject();
      }
docs: Returns the value mapped by {@code name} if it exists and is a {@code
  JsonObject}, or null otherwise.