Catch ObjectDoesNotExist exception when getting theme or subtheme