[DataLoader] Switch NotImplementedError to TypeError for len (#59464)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59464
Fixes #59378
Test Plan: Imported from OSS
Reviewed By: jbschlosser
Differential Revision: D28944447
Pulled By: ejguan
fbshipit-source-id: 8b3d53a1863b41e578d56f219e452d18d7eae0d8