I have found a collection in one of our MongoDB databases with the name my.collection.
my.collection
Is there a way to access this collection from the MongoDB shell,
Your code is correct. If it returns null it means that the collection is empty.