Add type checking to set function

This commit check the type of the set() function
parameters as done in Kazoo.
Merge pull request #1 from enovance/addTypeCheckingToSet

Add type checking to set function