fixed wrong condition for sanitize check
no need to check attribute value
pep8