Add function for checking if viewer exists