Add check for empty string XML as well as None