Fixed IF condition which wasn't allowing NULL values in setting.