How to handle dangling references to deleted records

Setting it to None should do it. Or some other value of course.