More useful error message in Model.cast