nit: if you change this to ```if not hasattr``` then you could eliminate the extra ```return```