max() cannot accept empty sequence