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


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

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

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

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

        @editor.updateContents delta
