Casimir force in liquid crystals close to the nematic–isotropic phase transition