Quality variable test

It just needs a isset test for the quality variable.