code: public static <P extends Enum<P>> JSONObject optJSONObject(final JSONObject json, P e,
                                                                 JSONObject fallback) {
          JSONObject jsonObject = optJSONObject(json, e);
          if (jsonObject == null) {
              jsonObject = fallback;
          }
          return jsonObject;
      }
docs: Returns the value mapped by enum if it exists and is a {@link JSONObject}. If a value is not
  mapped by that enum, returns {@code fallback}.
  
  @param json     {@link JSONObject} to get data from
  @param e        {@link Enum} labeling the data to get
  @param fallback Value to return if there is no mapped data
  @return A {@code JSONObject} if the mapping exists; {@code defValue} otherwise