Add a null check for value. "Trim pixel color value must not be null."