if (!(chatView is GroupChatView))
that includes a non-null check already