Handle boolean values properly in xss protection