Fixed addGuideLayer() method

either `layer._layers !== undefined` or `typeof layer._layers !== 'undefined'`, but a mix of both doesn't work!