Checkstyle - possible NPE and unneeded predicates removed

Fixed issues with the following 2 categories:

1. Removes unneeded predicates in cases where the result of the expression is always predicted
2. Removes possible NPE cases and passing of the null for varargs. 
OK. I read it like you removed the check on length whereas you added it. My fault.