Add validation to ensure arguments are callable

Thanks to bsdlite from reddit.