added stream undefined check
v0.0.6