- useful error message for bad data type (fixes #551)