Fix crash by handling wrong input for Color Range

Fixes http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-2476
Merge pull request #1371 from sharadkjaiswal/ColorRange

Fix crash by handling wrong input for Color Range