Avoid "if multi_index" when "... is not None" is intended, the former triggers bool conversion of the multiindex.
Merge branch 'martinal/fix-minor-bug'