Well if no layout is set it should presumably use the default layout for the content type.  Maybe getLayout already implements that logic; I don't remember.