arg checking compatible with MRI String#scrub