fix logic in mongo casting to doc
fix logic in mongo casting to doc

jclem/livedb,nmai/livedb,mcanthony/livedb,share/livedb,k-components/k-livedb,mattbrun/livedb,matthewbauer/livedb,bsnote/livedb,dialoghq/livedb