`collection.filter(p).headOption` can be replaced with `collection.find(p)`