Assert that there are no None arguments to backwards (#96300)
This assert would have caught https://github.com/pytorch/pytorch/pull/96219
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96300
Approved by: https://github.com/bdhirsh