fixed issue with last commit when atrrib was None, added a test