Refactored check for parameters into a new task.