check for boolean should compare the value to (bool)true instead of (string)'true'