Check for bad iframe src in isCrossOrigin()

If an iframe has a blank or invalid src attribute, the isCrossOrigin() function will generate an error. This adds some checks to prevent that.