The example in the documentation didn’t have a reduce function; it’s correct as an example of mapping. But when you’re reducing, the data being reduced is the values, so emitting a null value isn’t generally useful.