Only try to find the maximum if there are values