Correction of the function hasvalid value from Quotes