I believe the If Condition needs to be placed first and then the Conversion (maybe inside the Then Block of If).
Why is the Conversion being done first ? Since the value i believe is a String (Empty or Available), A check would need to be done to ensure a value is present at first and then perform conversion.