Changed all the empty arg checks to check for nil instead of empty string