still getting the following compilation error: 'NoneType' object has no attribute 'type' ... I'm working on it.