Check whether the colorset is valid before using it
CCBUG:392712 (cherry picked from commit a42c7e9137e2d8993a08eef6228ac26ec203f231)