This is the same as:
IF (@color IS NOT NULL AND @color <> '')
THEN ...
One more thing, try using a COALESCE
function instead ISNULL
, because SQL Standard is suggested first. The syntax is very similar:
IF COALESCE(@color, '') <> ''
BEGIN
...
END
source
to share