Could you maybe merge this with `add-to-library`? So that there is one method which allows adding to the collection, but if collection is `null`, it adds only to the library?