function preProcessor(q, field, document, userId, logger) {
    if (document[field.name]) {
        if(typeof document[field.name] === 'string'){
            return document;
        }else{
            let errMsg = field.componentName + " field named " + field.name + " has invalid value";
            logger.error("DropDownEx Preprocessing Failure : " + errMsg);
            return null;
        }
    } else {
        return document;
    }
}
module.exports = preProcessor;
