tree data new BUGFIX check value arg
diff --git a/src/tree_data_new.c b/src/tree_data_new.c
index f764e42..66c35f3 100644
--- a/src/tree_data_new.c
+++ b/src/tree_data_new.c
@@ -974,7 +974,7 @@
struct lysc_ext_instance *ext = NULL;
const struct ly_ctx *ctx = parent ? LYD_CTX(parent) : (module ? module->ctx : NULL);
- LY_CHECK_ARG_RET(ctx, parent || module, parent || node, name, LY_EINVAL);
+ LY_CHECK_ARG_RET(ctx, parent || module, parent || node, name, (value_type == LYD_ANYDATA_DATATREE) || value, LY_EINVAL);
LY_CHECK_CTX_EQUAL_RET(parent ? LYD_CTX(parent) : NULL, module ? module->ctx : NULL, LY_EINVAL);
if (!module) {