Fixed bug with "sum" snippet so that empty arrays don't reduce to nil.