Throw error when an accessfilter is not a function

[ci-skip]