minor fix for local average aggregate
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalAvgAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalAvgAggregateDescriptor.java
index 5ba9c06..256af09 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalAvgAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalAvgAggregateDescriptor.java
@@ -202,7 +202,7 @@
                     @Override
                     public void finish() throws AlgebricksException {
                         try {
-                            if (count == 0) {
+                            if (count == 0 && aggType != ATypeTag.NULL) {
                                 out.writeByte(ATypeTag.SYSTEM_NULL.serialize());
                                 return;
                             }