test getattr with default value