Maybe typeset is beyond set/unset, like a tattoo?
No need to typeset, just unset or set x and test x for being set.
Somewhere in the man page as copies way below, ksh promises you can test just set and unset, no typeset, but I cannot see it, so maybe just go for blank or not. Your test cost is mostly variable lookup:
$ dtksh -xc '
set x ; echo ColonEqualSet ${x:=Right};echo x=$x
unset x ; echo ColonEqualUnset ${x:=Right};echo x=$x
set x ; echo ColonMinusSet ${x:-Right};echo x=$x
unset x ; echo ColonMinusUnset ${x:-Right};echo x=$x
set x ; echo ColonPlusSet ${x:+Right};echo x=$x
unset x ; echo ColonPlusUnset ${x:+Right};echo x=$x
set x ; echo EqualSet ${x=Right};echo x=$x
unset x ; echo EqualUnset ${x=Right};echo x=$x
set x ; echo MinusSet ${x-Right};echo x=$x
unset x ; echo MinusUnset ${x-Right};echo x=$x
set x ; echo PlusSet ${x+Right};echo x=$x
unset x ; echo PlusUnset ${x+Right};echo x=$x
set x ; echo ColonQuerySet ${x:?Right};echo x=$x
unset x ; echo ColonQueryUnset ${x:?Right};echo x=$x
set x ; echo QuerySet ${x?Right};echo x=$x
unset x ; echo QueryUnset ${x?Right};echo x=$x
'
+ set x
+ echo ColonEqualSet Right
ColonEqualSet Right
+ echo x=Right
x=Right
+ unset x
+ echo ColonEqualUnset Right
ColonEqualUnset Right
+ echo x=Right
x=Right
+ set x
+ echo ColonMinusSet Right
ColonMinusSet Right
+ echo x=Right
x=Right
+ unset x
+ echo ColonMinusUnset Right
ColonMinusUnset Right
+ echo x=
x=
+ set x
+ echo ColonPlusSet
ColonPlusSet
+ echo x=
x=
+ unset x
+ echo ColonPlusUnset
ColonPlusUnset
+ echo x=
x=
+ set x
+ echo EqualSet Right
EqualSet Right
+ echo x=Right
x=Right
+ unset x
+ echo EqualUnset Right
EqualUnset Right
+ echo x=Right
x=Right
+ set x
+ echo MinusSet Right
MinusSet Right
+ echo x=Right
x=Right
+ unset x
+ echo MinusUnset Right
MinusUnset Right
+ echo x=
x=
+ set x
+ echo PlusSet
PlusSet
+ echo x=
x=
+ unset x
+ echo PlusUnset
PlusUnset
+ echo x=
x=
+ set x
dtksh: line 15: x: Right
${parameter:-word}
If parameter is set and is non-null then substitute its value. Oth-
erwise substitute word.
word is not evaluated unless it is to be used as the substituted
string.
In the following example, pwd is executed only if d is not set or
is NULL:
print ${d:-$(pwd)}
If the colon ( : ) is omitted from the expression, the shell only
checks whether parameter is set or not.
${parameter:=word}
If parameter is not set or is null, set it to word. The value of
the parameter is then substituted. Positional parameters cannot be
assigned to in this way.
word is not evaluated unless it is to be used as the substituted
string.
In the following example, pwd is executed only if d is not set or
is NULL:
print ${d:-$(pwd)}
If the colon ( : ) is omitted from the expression, the shell only
checks whether parameter is set or not.
${parameter:?word}
If parameter is set and is non-null, substitute its value. Other-
wise, print word and exit from the shell , if the shell is not
interactive. If word is omitted then a standard message is printed.
word is not evaluated unless it is to be used as the substituted
string.
In the following example, pwd is executed only if d is not set or
is NULL:
print ${d:-$(pwd)}
If the colon ( : ) is omitted from the expression, the shell only
checks whether parameter is set or not.
${parameter:+word}
If parameter is set and is non-null, substitute word. Otherwise
substitute nothing.
word is not evaluated unless it is to be used as the substituted
string.
In the following example, pwd is executed only if d is not set or
is NULL:
print ${d:-$(pwd)}
If the colon ( : ) is omitted from the expression, the shell only
checks whether parameter is set or not.