error checking for parsemessage