I can print a serial array but not use it in an IF statement

if (receivedChars == "empty")

You cannot compare strings like that. Use strcmp() instead