Added check layer type