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

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


  #
  # Returns a `Decoration` object.
  decorateMarker: (marker, decorationParams) ->
    return unless marker?
    marker = @getMarker(marker.id)

    if !decorationParams.scope? and decorationParams.class?
