Quick fix to ensure that float('nan') is not validated as a number