code: function(type, vis, data) {
      var t = Overlay._types[type];
  
      if (!t) {
        cdb.log.error("Overlay: " + type + " does not exist");
        return;
      }
  
      data.options = typeof data.options === 'string' ? JSON.parse(data.options): data.options;
      data.options = data.options || {}
      var widget = t(data, vis);
  
      if (widget) {
        widget.type = type;
        return widget;
      }
  
      return false;
    }
docs: create a type given the data raise an exception if the type does not exist