Use _.isString instead of sniffing method .replace