[SystemSetting] Fix SystemSetting API failures on tct test siute

Fix the validation of input parameters and throw the right
error when the invalid values are passed to getProperty()
or setProperty() methods.

Fixes #320.