   #
   # marker - The `marker` for which removing decorations.
   removedAllMarkerDecorations: (marker) ->
+    return unless marker?
     @decorationMarkerChangedSubscriptions[marker.id].dispose()
     @decorationMarkerDestroyedSubscriptions[marker.id].dispose()
 

  #
  # marker - The `marker` for which removing decorations.
  removeAllDecorationsForMarker: (marker) ->
    decorations = @decorationsByMarkerId[marker.id].slice()
    for decoration in decorations
      @emitter.emit 'did-remove-decoration', {marker, decoration}

  #
  # decoration - The `Decoration` to remove.
  removeDecoration: (decoration) ->
    return unless decoration?
    {marker} = decoration
    return unless decorations = @decorationsByMarkerId[marker.id]

