Fixing trigger_functions.py's set_value function

* fixed typo "perfdata"
* return_code can be 0, so specifically check for None