test&fix: null values crashing validations

when null or undefined  values are present in model then  range, length, formatOf validations are not working correctly