Baking could fail to access an objects evaluated mesh data (see #107426), while the error remains, prefer an error instead of crashing. Since the depsgraph runs Python callbacks I don't think we can provide a guarantee the mesh data will available, so even if #107426 is fixed, it's reasonable to have a check here.