Python Periksa apakah atribut ada di kelas
if hasattr(obj, 'propertyName'):
...
M. Alban Landry
if hasattr(obj, 'propertyName'):
...