aggregate functions should return option value