Add a better error message for valueof().