Follow-up on MR !2965

Bug description

There are a few spots which should be improved in the code from MR !2965 (merged) - especially on the usage of if() vs. IF()

Ways to reproduce

Box folder: ...\Box_EXTERNAL_IVAS_BASOP_VERIFICATION\issues\issue-xxxx