 
   insertHelper= (position, content) =>
     as_array =
-      if typeof content == "string"
+      if typeof content is "string"
         content.split("")
-      else if typeof content == "number"
+      else if typeof content is "number"
         [content]
     if as_array?
       @_get("characters").insertContents position, as_array

        delta =
          ops: [{retain: event.position}]

        if event.type == "insert"
          delta.ops.push {insert: event.value}

        else if event.type == "delete"
          delta.ops.push {delete: 1}

        @editor.updateContents delta

      # break, if lock is on
      return
    this.lock_editor_propagation = true
    if typeof obj is "number"
      @selfCursor = (@_get "characters").ref(obj)
    else
      @selfCursor = obj
