Switch getJSONObject to optJSONObject when checking for null caption.