Fixes #213 - use a more friendly error when dates are not defined properly