if self.input_type equals string 'hidden' and self has an attribute 'input_type', return boolean True, otherwise return boolean False.
return self . input_type == 'hidden' if hasattr ( self , 'input_type' ) else False