Function preventUndefined

Results in "invalidity" for undefined. Otherwise results in "validity" for any value that satisfies the specified checker