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

    else
      description = obj.tabTrigger

    snippet = {}
    snippet[obj.description] = { prefix: obj.tabTrigger[0], body: obj.content[0].trim() }

    atom = {}
    atom[scope] = snippet


  jsonToCson: ->
    editor = @workspace.getActiveTextEditor()
    unless editor?
      @atom.beep()
      return
    text = editor.getText()
