I have code like:

```
val mylist = (1,2,3)
val filteredList: List[Int] = mylist.map { num =>
   if (num < 3) num
}

```

So I want filteredList to contain (1,2). However, after this the type of filteredList is List[Any], not List[Int]. How do I remove the void/null/?? values to make it a true list of ints? I tried adding an else null clause then filtering out null values from filteredList, but it didn't seem like good Scala style...