mongodb/node-mongodb-native — pull request #934 by nmalaguti (2013-04-08 00:28:05+00:00)
Title: db.collectionNames throws when options is null

If options is defined but null it isn't set to an empty object and the call to options.namesOnly causes an error.

Probably not the best fix here, but it gets the job done. You could probably remove the check for args.length, but I wasn't sure if it would have other side effects to just coerce to bool, so I made the smaller fix.