Add check in Gridlines constructor for QuantitativeScale inheritance.

Add check in Gridlines constructor for QuantitativeScale inheritance.

Close #539.