check if animation exists before trying to use it