def check_layer_state(fileContainer,layerName):

	""" Checks is layer "layerName" exists.
		Returns True if it exists, and False otherwise. """

	for layer in fileContainer.layers:
		if layer.dxf.name == layerName:
			return True
	return False