Make sure that the layer exists prior to store it