+ /*
+ * Parameters must be a map value, but we create a convenient
+ * empty one if it's NULL.
+ */
+ if (params) {
+ if (!bt_value_is_map(params)) {
+ goto end;
+ }
+ } else {
+ params = bt_value_map_create();
+ if (!params) {
+ goto end;
+ }
+ }
+