Add optional type property for widgets