Add checking for missing data

Fixes #18