Fix NPE when IDEA is closing and the action is invoked for the unsaved file

I came across this by mistake.
It happens when you close IDEA on a previously backgrounded save action. It's a really hard one to replicate but at least the fix is easy :)