Fix for locating frames by name

If a site has frames that have no name or id, the iteration can error out early because j is null. By first checking that j isn't null or undefined, we avoid breaking this.
Merge pull request #216 from toddtarsi/patch-1

Fix for locating frames by name