Added null checks
IDE-265 support restarting workbench with open editor