operator
is
isnt
stream-name indexer? (is | isnt) buffer
You can use is buffer to test a stream variable to determine if it was opened as a buffer.
is buffer