A bit of cleanups

* tree.c: avoid calling xmlAddID with NULL values
* parser.c: add a few xmlInitParser in some entry points
diff --git a/tree.c b/tree.c
index be5c6b9..6d0e95b 100644
--- a/tree.c
+++ b/tree.c
@@ -1860,7 +1860,8 @@
         }
     }
 
-    if (xmlIsID((node == NULL) ? NULL : node->doc, node, cur) == 1)
+    if ((value != NULL) &&
+        (xmlIsID((node == NULL) ? NULL : node->doc, node, cur) == 1))
         xmlAddID(NULL, node->doc, value, cur);
 
     if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))