   #
   # Returns a `Decoration` object.
   decorateMarker: (marker, decorationParams) ->
+    return unless marker?
     marker = @getMarker(marker.id)
 
     if !decorationParams.scope? and decorationParams.class?

  #
  # 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]

