1) Try/catch around the evaluating a toggle function for server rendering.
2) Null checks for disposed items in Content$link.