Subtitles: Avoid trying to draw empty text or background objects.

Cherry-picked / adapted from 203db78ed2c8e9d59159d970b1eb89b5764a79f3.

Refs #12056