Allow null values in filterAnsi().

Fixes regression introduced in 9dc83d6aba0b332b524c4569976f64549b4bb9a8.