minor updates to type hinting values and error handling when setting value on API level