Function preventNullish

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