Could check that it is a function, although that is perhaps unpythonic where things just fail for inexplicable reasons.