Ref #2 : handle no layout found
Fix #2 : TypeError when no layout has been set yet
Merge pull request #8 from tonthon/master

Handle the case where no layout has been set yet