Maybe is_string would be even better (whitelist over blacklist). It's unfair that PHP can add primitive type annotation for it's functions while it is not possible for newly created functions.
Good idea, r100447.