Fixed AttributeError: 'NoneType' object has no attribute 'populate'
Merge pull request #2876 from timgraham/nonetype_populate

Fixed AttributeError: 'NoneType' object has no attribute 'populate'