Fix undefined/null in mongoutils
Properly handle multiple "optional" arguments