avoid error when obj.synchedNodes is undefined
don't render empty data-* attrs
improved textarea/input field switch