There is no reason for check for both. If it's a miss, then it will always be null. If it's a hit, and your code doesn't store null, then you know it isn't null.