Rename captionExists() to hasCaption() for better semantic readability and adding further tests and constraints.

Signed-off-by: Ben Corlett <bencorlett@me.com>