Exception thown in the menu part in some cases when the current page is null.