correctly detect a null value for colorObject and remove console.log statements