have max-element handle empty sequence by returning nil