check if containers layout is null before doing layout