Add $code and $scope to the list of exceptions in CollectionElementNameValidator.
Check for null documents in InsertMessageBinaryEncoder.