sharepoint online – Context.ExecuteQuery() will raise this error:- “System.NullReferenceException: ‘Object reference not set to an instance of an object.”

I have the following CSOM code inside my core console application:-

 TaxonomySession txSession = TaxonomySession.GetTaxonomySession(context);
 TermStore tc = txSession.TermStores.GetByName(termstorename);
 TermGroup g = tc.Groups.GetByName(groupname);
                                    var technician = context.Site.RootWeb.EnsureUser(SQLitem.Technician);
                                    NewUFSlistItem("UserFeedbackEngineer") = technician;
                                catch (Exception e)


                                TermSet ts = g.TermSets.GetByName(termsetname);
                                var customername = ts.Terms.GetByName(SQLitem.Account);

now if the first context.ExecuteQuery(); raise an exception (mainly when the context.Site.RootWeb.EnsureUser(SQLitem.Technician) raise an error when the user can not be found), the second context.ExecuteQuery(); will raise this error:-

System.NullReferenceException: 'Object reference not set to an instance of an object.'

so i am not sure why this is happening? any advice?