Added warning if asWidget is called while being null
Merge pull request #644 from ArcBees/cg_on_attach-3

Added warning if asWidget is called while being null