This is a common error, that I've seen. Instead of resetting my entire UI, I decided to create a simple Addon to squash the error and ensure that the `strlower` function will not error if nothing is passed to it.
Reference: https://us.forums.blizzard.com/en/wow/t/chatframe-lua-error/47531
This was created for and tested in Wrath Classic, but most likely would also work in Retail (and maybe Classic, but I'm not sure about that).