Update ValueError message in corr
to include the option of supplying a callable.

- [x] closes #25727
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
