IDEA plugin minor bugfixes, defence from NPE