python-rados: extract type-checking into a decorator

Signed-off-by: Kefu Chai <tchaikov@gmail.com>