Whats wrong with this line

I have a web app that calls a ‘GetProduct’ method in the shown event. When the program hits the following line it raises a ‘Nil object exception’. The line causing grief is : PROD.DSC =mid(inpstr,5) Where PROD.DSC is a property derived from a product class I created. The status of everything before it hits the line is;
PROD.DSC=""
inpstr=a line of text input from a text line.

Any ideas why a straight forward bit of code like this falls over at run time?

Don’t worry, I found the problem. it was the location of the PROD=new product statement DOH!!