Need to qualify Schema.JSON, because minification might leave JSON untouched (which will break this check). Also, added a second parameter to Schema.registerType to specify the name, because again, Function.prototype.name will not be as expected after JS is minified.