IDE-1714 close new profile dialog wizard too fast cause dispose exception

...n
Lets check for both runtime not null and new profile is not disposed.