Fix for can't convert nil into String
Fix for undef