Adding check to make sure the agg is a bucket