Function preventNull

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