Check whether caption text is set, and only display or return its components if it is