Avoid a potential null value

If `$option->type` is neither set to `enable` or `disable`, we will have a null value for `$t`. Also, I have renamed some variables for a better readability.