Fix checkSet/checkUnset to allow parameter sanitization