added nullAttributes to strip unnecessary extra stuff away from map and reduce expressions