validation for int or NaN