function [isSame,isValid] = convShapeCheck(errID, shape)
% Helper to check the shape input

% Copyright 2015-2017 The MathWorks, Inc.

if nargin < 2
    shape = 'full';
else
    % Check not empty
    if ~isScalarString(shape) || isempty(shape)
        error(message(errID));
    end
end
isFull = startsWith('full',shape,'IgnoreCase',true);
isValid = startsWith('valid',shape,'IgnoreCase',true);
isSame = startsWith('same',shape,'IgnoreCase',true);

if ~isFull && ~isSame  && ~isValid
    error(message(errID));
end
end