code: static void putStringHashIfNotNull(
              @NonNull JSONObject jsonObject,
              @NonNull @Size(min = 1) String fieldName,
              @Nullable Map<String, String> value) {
          if (value == null) {
              return;
          }
          JSONObject jsonHash = stringHashToJsonObject(value);
          if (jsonHash == null) {
              return;
          }
  
          try {
              jsonObject.put(fieldName, jsonHash);
          } catch (JSONException ignored) { }
      }
docs: Util function for putting a String-String map value into a {@link JSONObject} if that
  value is not null. This ignores any {@link JSONException} that may be thrown due to
  insertion.
  
  @param jsonObject the {@link JSONObject} into which to put the field
  @param fieldName the field name
  @param value the potential field value