Added check for parameters