Handling the null case for removeAll