code: static void putStringIfNotNull(
              @NonNull JSONObject jsonObject,
              @NonNull @Size(min = 1) String fieldName,
              @Nullable String value) {
          if (!StripeTextUtils.isBlank(value)) {
              try {
                  jsonObject.put(fieldName, value);
              } catch (JSONException ignored) { }
          }
      }
docs: Util function for putting a string value into a {@link JSONObject} if that
  string is not null or empty. 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