Fixing error when col is undefined

I was loading multiple color pickers on one page and for some reason setColor was getting called after all the inputs were loaded with an undefined col. I am just adding this for my use case.