1. AbstractMongoQuery.execute() calls ReturnedInterface.getTypeToRead() 2. ReturnedInterface.getTypeToRead() returns null when the query's result is a closed projection 3. AbstractMongoQuery.execute() calls StringBasedAggregation.execute() 4. StringBasedAggregation.execute() calls StringBasedAggregation.isSimpleReturnType() and passes null as the targetType 5. StringBasedAggregation.isSimpleReturnType() calls MongoSimpleTypes.HOLDER.isSimpleType() 6. MongoSimpleTypes.HOLDER.isSimpleType() raises a NullPointerException by attempting to invoke type.isEnum() when type is null This does not happen when projecting to a class.