The method getElementById() returns an element if matches or null.
Your error is caused because you trying to access a property of an object (an HTML node) that is null (aka not found in the DOM). It’s either the property “text” or “nameText”
If you are not sure about a property of an object , you can use the Optional chaining (?.):
this.text = document.getElementById(review)?.textContent;
(more on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining).
You could set the properties “text” and “nameText” with the optional chaining operator (they will be set to undefined if the method getElementById() doesn’t find any matches).
That being said, if you can find the id via devs tools, keep in mind that document. getElementById() accepts a string as the id. What are you passing exactly as argument of the getElementById(argument) method?
Make sure that the string does not contain a leading “#” like you would do with querySelector(selectors), check Capitalization of the string…