No need for the `null` check? `null` is not an `instanceof` anything, so the second check will fail if `credentials == null`.