None check before getattr