arr = Object.prototype.toString.call(val.leadGrade) if(arr !=='[object Number]'){ val.leadGrade = 0 ; }