rustc: Check for null before dropping ~objects. #5192

r? @catamorphism 

This could probably refactored to more closely mirror the code for `@objects`, but I'm not inclined to do so.