This is why it is not good practice to mix multiple types/meanings into a single variable, better to use two.  Otherwise, add a comment like <code># int value for check  exit code, str value for error_test.space_option</code>.  Then there is no chance for confusion, and any bugs are made obvious ;)