diff --git a/SearchEndpoint/AggregationsEndpoint.php b/SearchEndpoint/AggregationsEndpoint.php
index <HASH>..<HASH> 100644
--- a/SearchEndpoint/AggregationsEndpoint.php
+++ b/SearchEndpoint/AggregationsEndpoint.php
@@ -40,7 +40,7 @@ class AggregationsEndpoint implements SearchEndpointInterface
      */
     public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
     {
-        if (!empty($this->bag->all())) {
+        if (count($this->bag->all()) > 0) {
             return $this->bag->toArray();
         }
     }
AggregationsEndpoint is now using count() instead of empty()