function value = checkSetupCleanup(h,prop,value)

%   Copyright 2014-2020 The MathWorks, Inc.
prop = convertStringsToChars(prop);
value = convertStringsToChars(value);

if ischar( value )
    if isempty( value )
        value = {  };
    else
        value = cellstr( value );
    end
end
if ~isempty( value ) && ~iscell( value )  %% ~iscellstr(value)
    if ~isempty( strfind( prop, 'MATLAB' ) )
        error( message( 'coder_compile:toolchain:InvalidMATLABSetupCleanup', prop ) );
    elseif ~isempty( strfind( prop, 'Shell' ) )
        error( message( 'coder_compile:toolchain:InvalidShellSetupCleanup', prop ) );
    end
end
end
