             else
               physicalIndex = change[0]
             item = instance.getDataAtRow(physicalIndex)
-            Api.update_task gon.project_id, item.id, item, (task) ->
-              # nothing to do here
+            if item?
+              Api.update_task gon.project_id, item.id, item, (task) ->
+                # nothing to do here
 
       cells: (row, col, prop) =>
         cellProperties = {}

    task = @getTask(item.id)
    task.name = item.name
    task.description = item.description
    task.tags = item.tags
    task.assignee_id = item.assignee_id
    task.original_estimate = item.original_estimate
    task.remaining_estimate = item.remaining_estimate

      afterChange: (changes, source) ->
        Tasks.updateSummary()

        return if source != 'edit'

        for change in changes
          if change[1] != 'delta'
            instance = grid.handsontable('getInstance')
