Added error checking for passed in argument