   # Convert Sublime Text snippet into Atom snippet
   sublSnipToAtom: ->
     editor = @workspace.getActiveTextEditor()
-    if typeof editor is "undefined"
+    unless editor?
       @atom.beep()
       return
     text = editor.getText()


  csonToJson: ->
    editor = @workspace.getActiveTextEditor()
    if typeof editor is "undefined"
      @atom.beep()
      return
    text = editor.getText()

  # Convert Atom snippet into Sublime Text completion
  atomToSubl: ->
    editor = @workspace.getActiveTextEditor()
    unless editor?
      @atom.beep()
      return
    text = editor.getText()
