Cleaner domify and undomify implementation, handle SafeString, catch domify error when no dom nodes.