How can I fix the 'undefined method `upcase' for nil:NilClass:' error in Xero?