Fix reporting of error message in toBool (#35570)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/35570
Test Plan: Imported from OSS
Differential Revision: D20710690
Pulled By: zdevito
fbshipit-source-id: a83c687058c09943438f4c7e183754f931783fbc