adding checker for attachments in case and removing tab otherwise