CS-5855 [Contact] JS error when add contact or edit shared calendar on F...

...irefox

Fix description: check contact layout is not undefined before adding into contact layout manager.