fixes #2577 maintenance  implemented testNull() method and added check nullity condition on predicate classes

Can you add message, e.g. throw new IllegalArgumentException("first can't be null")

A few more things:
- I don't see any documentation added
- there is no test
- do we want to use an IllegalArgumentException for this or a NullPointerException. We should be consistent and in e.g. Map we use NullPointerException