Проверка Python, есть ли атрибут в классе
if hasattr(obj, 'propertyName'):
...
M. Alban Landry
if hasattr(obj, 'propertyName'):
...