bool yang_dnode_get_empty(const struct lyd_node *dnode, const char *xpath_fmt,
			  ...)
{
	va_list ap;
	char xpath[XPATH_MAXLEN];
	const struct lyd_node_term *dleaf;

	assert(dnode);

	va_start(ap, xpath_fmt);
	vsnprintf(xpath, sizeof(xpath), xpath_fmt, ap);
	va_end(ap);

	dnode = yang_dnode_get(dnode, xpath);
	if (dnode) {
		dleaf = (const struct lyd_node_term *)dnode;
		if (dleaf->value.realtype->basetype == LY_TYPE_EMPTY)
			return true;
	}

	return false;
}
bool yang_dnode_get_empty(const struct lyd_node *dnode, const char *xpath_fmt,
			  ...)
{
	va_list ap;
	char xpath[XPATH_MAXLEN];
	const struct lyd_node_term *dleaf;

	assert(dnode);

	va_start(ap, xpath_fmt);
	vsnprintf(xpath, sizeof(xpath), xpath_fmt, ap);
	va_end(ap);

	dnode = yang_dnode_get(dnode, xpath);
	if (dnode) {
		dleaf = (const struct lyd_node_term *)dnode;
		if (dleaf->value.realtype->basetype == LY_TYPE_EMPTY)
			return true;
	}

	return false;
}