COOK-2318 - Removing redundant if block