Null check in OnChat