TOOLS-1952 added some code that can result in a nil pointer panic under some error conditions. Specifically, this block looks like it should be guarded by err == nil instead of err != nil.
[v4.2] Nil pointer error mongodump
Use --forceTableScan by default when running against WiredTiger nodes
Pull Request (mongodb/mongo-tools master)
Pull Request (mongodb/mongo-tools-common master)