Let tfvec_len and tfvec_elem give a proper error message.