Provide in any case category parent information

When a product page is loaded and previous page check category test but is not a category (as product page with rewrite rule), category information is not set.
 A test is done to set at least default category information for any situation