Make sure data exists before using it

Fixes #26