Is defined conditional passing, yet causes a "do not have a method or closure named" error
This is a weird twig behavior. You have to do if   stRow['caption'] is defined to make it work because of the object syntax of twig.

Sometimes the if defined statement becomes true when you don't use the array syntax