Ref #2 : handle no layout found
Fix #2 : TypeError when no layout has been set yet