The function filter_special_chars does not have to throw a TypeError
when its argument text is null or undefined because (1) it can be argued
that neither of these two contains special characters and (2) it is much
more convenient to have the check in the function in question rather at
its multiple call sites.