helps to have a null check for last color