fixes #2577
change conditions
change Exception, add individual tests and add checking for null array.
fixed imports
Merge pull request #2710 from hasancelik/issue#2577-maintenance

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