added check to variable width an set it to isnanwidth

// check to see if the variable width is a number or not