Convert possible strings to boolean before doing checks

Otherwise, they may not match if the user sets the attribute to the string 'true'