fix NPE on (tg/open?) when no graph open or graph is shutdown
Merge pull request #21 from AtKaaZ/NPEonIsOpen

fix NPE on (tg/open?) when no graph open or graph is shutdown