Checking a float during lerp

I have an object using Mathf.Lerp and an offset variable for the y position like you see in the headbobber script.

My code is basically this:

if(bool == true){
    offset = Mathf.Lerp(offset, desiredValue, speed * Time.deltaTime);
    if(offset == desiredValue){
        print ("Yeah");
        bool = false;
    }
    
}

This works, but my offset variable never actually reaches the desired value no matter the speed. This is really vital for a scripted animation I use for changing equipped items. Is there a way to ensure it reaches that value? No matter what I said the checked value it never prints, my gameobject needs to always end up in the same rest position.

if(offset <= desiredValue + imprecisionFactor && offset >= desiredValue - imprecisionFactor){
//Do your stuff here.
}

offset is a float value and thus you are very unlikely to ever hit that precise number. You will need to check if offset is within a certain value(imprecisionFactor).