Defined class attribute before using it