Why is this check necessary? (and the if(posts) one above)?