Regression: fix incorrect empty check in get_site_info

We want to check that the the ID is there if the post exists, not the other way around.