Fix for mongo exception in map function

The following exception occurred when skipping profile documents with non-string commands like "$eval", "dbstats", "collStats", "profile".

RuntimeException: exception: TypeError: Object function (){ return db.getCollectionNames(); } has no method 'substr' near '[command].substr(0, 7) === "system.") ' (line 31)