Add more error handling and nil checking

+ make sure no nil pointer pass to the livxml
+ raise exception when call mutation method on a node where underlying node is nil (e.g. when a node is removed)