not calling resume() for putting stream
use instanceof operator to check stream object