Chapter 5 Exercise 1 (strictly typed if statements)