Fix nan -> None coercion for lists and dicts