Removed more checks for string emptiness using strlen.