Updated all checks to work for empty messages as well as illegal characters.