diff --git a/jubatus/common/client.py b/jubatus/common/client.py
index d599319..9cd91a8 100644
--- a/jubatus/common/client.py
+++ b/jubatus/common/client.py
@@ -54,6 +54,10 @@ class ClientBase(object):
       (`unpack_encoding=None`)
     """
     def __init__(self, host, port, name, timeout=10):
+        check_types(host, string_types)
+        check_types(port, int_types)
+        check_types(name, string_types)
+        check_types(timeout, int_types)
         address = msgpackrpc.Address(host, port)
         self.client = msgpackrpc.Client(address, timeout=timeout, pack_encoding='utf-8', unpack_encoding=None)
         self.jubatus_client = Client(self.client, name)
@@ -65,6 +69,7 @@ class ClientBase(object):
         return self.jubatus_client.name
 
     def set_name(self, name):
+        check_types(name, string_types)
         self.jubatus_client.name = name
 
     def save(self, id):

no type validation for constructor arguments
Currently argument types are validated, but constructor arguments are not.
For example, the following code:

```
c = jubatus.Classifier("localhost", 9199, 0)  # it should be ("localhost", 9199, "") to work
c.get_status()
```

raises "TypeMismatch (error 2)" on RPC call, which is difficult to understand.
diff --git a/test/jubatus_test/common/test_client.py b/test/jubatus_test/common/test_client.py
index 0e929f8..065b538 100644
--- a/test/jubatus_test/common/test_client.py
+++ b/test/jubatus_test/common/test_client.py
@@ -67,5 +67,22 @@ class ClientTest(unittest.TestCase):
         self.assertEqual("test", c.call("test", [], AnyType(), []))
         self.assertRaises(TypeError, c.call, "test", [1], AnyType(), [])
 
+class ClientBaseTest(unittest.TestCase):
+    def test_constructor(self):
+        self.assertIsInstance(jubatus.common.ClientBase("127.0.0.1", 9199, "cluster", 10), jubatus.common.ClientBase)
+
+        # invalid host
+        self.assertRaises(TypeError, jubatus.common.ClientBase, 127001, 9199, "cluster", 10)
+
+        # invalid port
+        self.assertRaises(TypeError, jubatus.common.ClientBase, "127.0.0.1", "9199", "cluster", 10)
+
+        # invalid name
+        self.assertRaises(TypeError, jubatus.common.ClientBase, "127.0.0.1", 9199, 10, 10)
+
+        # invalid timeout
+        self.assertRaises(TypeError, jubatus.common.ClientBase, "127.0.0.1", 9199, "cluster", "test")
+        self.assertRaises(TypeError, jubatus.common.ClientBase, "127.0.0.1", 9199, "cluster", 1.5)
+
 if __name__ == '__main__':
     unittest.main()

pip install -e .[test]
parse_log_pytest
pytest
pytest
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
-e git+https://github.com/jubatus/jubatus-python-client.git@34f9f83ee2d230672518102e541286425c92c287#egg=jubatus
msgpack-python==0.5.6
msgpack-rpc-python==0.4.1
packaging @ file:///croot/packaging_1734472117206/work
pluggy @ file:///croot/pluggy_1733169602837/work
pytest @ file:///croot/pytest_1738938843180/work
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
tornado==4.5.3

name: jubatus-python-client
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py39h06a4308_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - msgpack-python==0.5.6
      - msgpack-rpc-python==0.4.1
      - tornado==4.5.3
prefix: /opt/conda/envs/jubatus-python-client

test/jubatus_test/common/test_client.py::ClientBaseTest::test_constructor
test/jubatus_test/common/test_client.py::ClientTest::test_remote_error test/jubatus_test/common/test_client.py::ClientTest::test_type_mismatch test/jubatus_test/common/test_client.py::ClientTest::test_unknown_method test/jubatus_test/common/test_client.py::ClientTest::test_wrong_number_of_arguments
jubatus/common/client.py
jubatus/common/client.py