feat: introduce isprimitive function which should solve the issue with instance type testing with PY3