Exactly what I was looking for...if you were to use an if statement to detect if the element(s) exist or not and only create the tween if they exist - how would you go about this? Apologies, my general JS skills aren't great.
For example, for something as simple as this...
gsap.to(".loading-screen", {
delay: 2.8,
top: "-100%",
ease: "expo.inOut"
});
or
var tween = gsap.to(".loading-screen", {
delay: 2.8,
top: "-100%",
ease: "expo.inOut"
});