See: https://github.com/mongodb/mongo-php-driver/pull/130/files#r43516997
PHPC-475 toJSON and fromJSON should throw exceptions on errors
PHPC-613 toJSON() should throw on invalid BSON
PHPC-615 toJSON() should return after throwing for bson_reader_read() failure