Fixed a potential NPE

It is preferable to have a nop output rather than NPE.

Fixes #107
Thx!