NP-3178: revised comparison of min and max fields in clean() method