Add check in Gridlines constructor for QuantitativeScale inheritance.

Add check in Gridlines constructor for QuantitativeScale inheritance.

Close #539.
I remember there was an issue #638 
Does this change fall under here?