python sqlite check if select is empty