I'd prefer to check it is callable. (there is a built-in for that)