fix recentposts theme building null query, throw error instead