Exception was possible becayse was by mistake was used a getattr instead
of hasattr