null reference check in parseInvitePayload