Mark widgetDef as optional.