Test regex result before accessing by index
If the content attribute of the selected tag is empty or malformed, then
/app-id=([^\s,]+)/.exec(meta.attr('content')) is going to return null and
trying to index into null is a bad time.