Query if the stored value is of type LuaThread.
bool get isThread => switch (isRef) { true => deref().isThread, false => _value is LuaThread, };