Checking if a page is available before trying to add error message to it. This replaces a try-catch because in occasions a FinalException was being thrown, with apparently cannot be caught.