Exercise 1.2 : filtering (dynamic types)