NPE fix
(cherry picked from commit 1eb3644)
IDEA-115351 Idea UI hangs after performing Move Module to group
(cherry picked from commit 673ed61) [r=Maxim.Mossienko]