try
if (filter._id) { filter._id = new ObjectId(filter._id) }
before calling
collection.find(filter)
In json, _id stays a string.