invoke tickInterval.unref in ExponentiallyWeightedMovingAverage module only if function is present