out BUGFIX trim print and opque nodes

Fixes cesnet/netopeer2#952
diff --git a/src/out.c b/src/out.c
index 4c72b10..d848b25 100644
--- a/src/out.c
+++ b/src/out.c
@@ -43,7 +43,7 @@
         if (node->flags & LYD_DEFAULT) {
             /* implicit default node/NP container with only default nodes */
             return 0;
-        } else if (node->schema->nodetype & LYD_NODE_TERM) {
+        } else if (node->schema && (node->schema->nodetype & LYD_NODE_TERM)) {
             if (lyd_is_default(node)) {
                 /* explicit default node */
                 return 0;