Modified function parameter testing so that it doesnt trigger errexit