Improve handling of non-num when expected num.