handle nil as well as false

because tonumber doesn't :(