added a null check to color effects to prevent crashing