Simple null check in OnLeave

Because it keeps throwing errors for people