Fixed bug on mongo error result checking

The field "ok" from mongo result sometimes is Double and sometimes is Integer. When it is integer, the code fails to get a BSONDouble.  So the result is 0, generating an error when, in true, it does not exist.