Callable typehint and tests

This PR replaces the "Closure" typehint with "callable" instead so that functions and class methods can be used for comparisons, as well.