Jos,
None
is an option value, it cannot be used as a graphics primitive. Use an empty list instead.
Manipulate[
ListLinePlot[data2,
Epilog ->
If[points == "No Points", {},
If[points == "Points", {PointSize[0.04], Red,
Point[data2]}]]], {points, {"No Points", "Points"}}]
For this situation, I find it easier to read using Which
rather than nested If
.
Manipulate[
ListLinePlot[data2,
Epilog ->
Which[points == "No Points", {},
points == "Points", {PointSize[0.04], Red, Point[data2]}]],
{points, {"No Points", "Points"}}]