Added cast support on Model.aggregate