SoftwareSerial Problem, Forwarding data to ESP8266 Garbage Output

can you clarify this

  if( s != ''){ // is a new line, i dont have the power to change it. I am confused by it as well.

why wouldn't that be

    if ( s != '\n' && s != '\r' && s != -1) {

(with s defined as an int, not a char to capture potentially the rare times when you'll get a -1 as returned by read()).