A type conversion error occurred on line 24 of the code. How can I resolve this issue 