Checks if a contract implements a function