Fix missing return in ensureDouble()