See if passed-in filter is a function