     buffer.getTextInRange([start, end])
 
   prettifyTitle: (title) ->
+    return if not title
+
     if (colon = title.indexOf(':')) isnt -1 and title.words().length > 5
       title = title.substring(0, colon)
 
     title.titleize().truncateOnWord 30, 'middle'
 
   cleanAuthors: (authors) ->
-    if not authors? then return [{ familyName: 'Unknown' }]
+    return [{ familyName: 'Unknown' }] if not authors?
 
     for author in authors
       [familyName, personalName] =

  ###
  wordRegex: /(?:^|\s)@[^\s@]*/
  constructor: ->
    @buildWordList(atom.config.get "autocomplete-bibtex.bibtex")
    atom.config.observe "autocomplete-bibtex.bibtex", (bibtexFiles) =>
      @buildWordList(bibtexFiles)

    @readBibtexFiles(bibtexFiles)

    for citation in @bibtex
      if citation.entryTags and citation.entryTags.title and citation.entryTags.author
        citation.entryTags.prettyTitle =
          @prettifyTitle citation.entryTags.title

        citation.entryTags.authors =
          @cleanAuthors citation.entryTags.author?.split ' and '
        citation.entryTags.prettyAuthors =
          @prettifyAuthors citation.entryTags.authors

        for author in citation.entryTags.authors
          possibleWords.push {
            author: @prettifyName(author, yes),
            key: citation.citationKey,
            label: "#{citation.entryTags.prettyTitle} \
              by #{citation.entryTags.prettyAuthors}"
          }

    @possibleWords = possibleWords

