Uncaught TypeError: Cannot read property 'path' of null  if new file or no file was opened

Hi, when I tried to run plugin if new (untitled) file was opened or no file was opened I got error because  atom.workspace.getActiveEditor().buffer.file (in case of untitled file) or  atom.workspace.getActiveEditor().buffer (in case of no file) were undefined and plugin would throw error.

I have added check.