Register post types early to avoid empty/null results.