Check that textRects is not empty, otherwise np.max raises ValueError.