handle getState when layers contains Openlayers.layer.Vector

Make more verbose error message, and skip getting state of layer if instanceof Openlayers.Layer.Vector since it has no source.