Ensure that a realm has been selected before we throw an error or else this will trigger on the first page load.
Adding realm variable to the invalid realm pages so that the dropdwon clears