Added checks if there is no global colormap and a local colormap to avoid