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. 
Actually, we are adding that here. Previously, the array was only checked for null and not the length. This meant that callers of this method could pass NULL for the VARARGS credentials which is somewhat confusing. (null array vs. zero-length array?) We either want to pass an empty non-null array or an overloaded version of that method which does not take the varargs.