How many times have you had the runtime exception
AttributeError: 'NoneType' object has no attribute 'foo'
(or its equivalent in your favourite language)?