fixes #2577
change conditions
change Exception , add individual tests and add checking for null array.
Merge pull request #2709 from hasancelik/issue#2577

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