`goog.asserts.assertInstanceof(layer, ol.layer.Layer)` sounds better to me.