     @_rte.words[i].word
 
   getWords: (begin, end) ->
-    if not end?
+    if _.isUndefined(end)
       end = @_rte.words.length
     if not (0 <= begin <= end <= @_rte.words.length)
       throw new Error "Index out of bounds: #{[begin, end]}"


    else throw new Error "Wrong set of parameters #{[a, b, c, d, e]}"

    if style?
      @style = style

    @startPos.lt = @endPos.lt = (s) ->

  #   @param [String] content the initial content to set
  #
  val: (content)->
    if not _.isUndefined(content)
      # reset styles when replacing content
      @_rte.words = []
      @_rte.style = []
