better assert check for numbers/NaN