Sometimes getDB().getCollection().findOne() returns DBObject not
BasicDBObject - now handles both cases