Arduino and NodeMCU infinite loop when checking connection status esp8266.find

I was thinking about the first line which is a function as you can see and which body is included just above this snippet.

Anyway, wherever code prints values from ESP it still prints "OK" and esp8266.find("OK") is not interpreting it correctly or I make it wrong way.