Hi @SS_11298241 ,
when you set the parameter to an value you need to check what is the value there.
I believe that app parameter could not be set later to undefined but it is an empty string- there is some automatic parsing.
The quesiton how you did hanlde the setting a parmater value to undefined. Possibly you can use the string 'undefined' and check something like
if($scope.app.params['uid'].indexOf('undefined') !=-1) ... please see also https://stackoverflow.com/questions/2559318/how-to-check-for-an-undefined-or-null-variable-in-javascript
but possibly you can check an empty string https://stackoverflow.com/questions/5515310/is-there-a-standard-function-to-check-for-null-undefined-or-blank-variables-in
or not valid uid ... (so means the stinng does not match the uid requirments) I think you need to have define your function e.g. (check_valid_uid) what should be the best option.
It depends when you say reused - what that means. where you reuse .it ? e.g. $whatch construct or some service call.... you can even do you check if ui is valid or not.
Thanks