Is `courses` a collection of course objects, or a collection of strings? If it's not strings, why are you checking if a string is in it?