Added warning if asWidget is called while being null