terminal-live-p

terminal-live-p is a built-in function in `C source code'.

(terminal-live-p OBJECT)

Return non-nil if OBJECT is a terminal which has not been deleted.
Value is nil if OBJECT is not a live display terminal.
If object is a live display terminal, the return value indicates what
sort of output terminal it uses. See the documentation of `framep' for
possible return values.