Postgresql Check If Select Is Empty