Updated the check if $spl_cur_post is empty or not