Raise InvalidArgumentError if method name or to block
are both not supplied