SERVER-14107 Querying for a document containing a value of either type Javascript or JavascriptWithScope crashes the shell

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>