Added empty message check