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

Normally a if/else is not used for this.

So you get something like
```
if(value == null){
   throw new WhateverException(..)
}
this.value = value;
```