Fixes #2522 : (master) Predicate fails with NPE if field value is null

Fixes #2522 : (master) Predicate fails with NPE if field value is null