added verification for empty message