Refactored the code to convert string values to boolean for conditional checks and update the `changed_when` attribute accordingly.
Refactored the code to convert string values to boolean for conditional checks and update the `changed_when` attribute accordingly.