NullReferenceException error, but it doesn't stop the code from working

I’m glad I could help!