Many people are having trouble testing whether a value is NULL.
The secret is on p. 249 of the text.
Incidentally, I hope people are aware that for the midterm, you are
assumed to have read the relevant sections of the text.
Not everything gets covered in class.