Fixed null handling problem in c.p.a.MaxBy and c.p.a.MinBy.