BUG: Allow non-callable attributes in aggregate function. Fixes GH16405
 - [x] closes #16405
 - [x] tests added / passed
 - [x] passes ``git diff upstream/master --name-only -- '*.py' | flake8 --diff``
 - [x] whatsnew entry
