fixes bug where type is overloaded with a constructor function
addWidget *always* creates a Widget now if JSON is passed in except during the initial build -- fixes weird return values where addWidget sometimes created widgets and stored them and sometimes created DOM nodes and didn't store them