Your msg="" should change to msg=nil in that case.