fixes issue #204

fixes issue #204 
`filteredTypeNames` are now used in both branches. If I move the declaration into if branch, the else branch will have to contain the `return` statement. Is that what you mean?