Check if empty and trim directly $page variable