Add isset check prior to output

Fixes #5