Only call widget.destroy() if widget.element is not null. Fix #319

(seems the nested grid in the demos is destroyed already at the time we try
to destroy the outer one)