I would not do this check; instead, reverse the direction of the String `equals` calls in the next few blocks so that the null `binaryKeyMode` can be passed into the `equals`, which would return `false`.