Another fail safe method arises to due a logical reason:
1. Off the record (OTR) chats are not recorded.
2. There is message delivery notification in GTalk.
Putting these together: if you chat OTR with X and later, if you send a message to X (who is invisible) and you get a red error "X did not receive your message", then X is offline. For a normal offline contact, it would have been delivered as an offline message, but since the conversation is OTR, it cannot be recorded and hence you get a notification. :-)
On the other hand, if X is online, you don't get the red message.
1. Off the record (OTR) chats are not recorded.
2. There is message delivery notification in GTalk.
Putting these together: if you chat OTR with X and later, if you send a message to X (who is invisible) and you get a red error "X did not receive your message", then X is offline. For a normal offline contact, it would have been delivered as an offline message, but since the conversation is OTR, it cannot be recorded and hence you get a notification. :-)
On the other hand, if X is online, you don't get the red message.