Finding grease pencil erasers via python in 2.8
You can check the gpencil_tool property of the brush object.

According to the documentation, it will contain one of these options:


  
  DRAW Draw, The brush is of type used for drawing strokes.
  FILL Fill, The brush is of type used for filling areas.
  ERASE Erase, The brush is used for erasing strokes.
  


So you can make sure you only access DRAW brushes by using this if statement in your loop:       

if brush.gpencil_tool == "DRAW":
    #Do something