make whiten() work on lists and nans