defensive programming checks in feed queries