Fix "Comparing an array to null is not useful".
I believe this is what was originally intended by these invalid checks.