code: public static <P extends Enum<P>> JSONArray optJSONArray(final JSONObject json, P e,
                                                               boolean emptyForNull) {
          JSONArray jsonArray = optJSONArray(json, e);
          if (jsonArray == null && emptyForNull) {
              jsonArray = EMPTY_ARRAY;
          }
          return jsonArray;
      }
docs: Returns the value mapped by enum if it exists and is a {@link JSONArray}. If the value does not
  exist by that enum, and {@code emptyForNull} is {@code true}, returns {@link #EMPTY_ARRAY}.
  Otherwise, returns {@code null}.
  
  @param json         {@code JSONObject} to get data from
  @param e            {@link Enum} labeling the data to get
  @param emptyForNull {@code True} to return {@code EMPTY_ARRAY} if there is no mapped data,
  {@code false} to return {@code null} in that case
  @return A {@code JSONObject} if the mapping exists; {@code EMPTY_ARRAY} if it doesn't and
  {@code emptyForNull} is {@code true}; {@code null} otherwise