It seems like there is no way to have unassigned local variables in your code or check for them, as the compiler spits out Use of unassigned local variable erro
Use of unassigned local variable
1 Why does the compiler not allow the use of uninitialized variables?
Because preventing that promotes good programming.
2 Why does the compiler allow the use of uninitialized class members?
Because it's not possible to track this with any accuracy.