(setq data(entget(car(entsel))))
This will get the dxf code for the insert, not the block definition, where as
(setq data(tblnext "block" (null data)))
gets the dxf code for the block definition.
With the first code, data equals
(-1 . <Entity name: 75b0ae00>)
(0 . "INSERT")
(330 . <Entity name: 7becac10>)
(5 . "4F50")
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
(8 . "XREF")
(100 . "AcDbBlockReference")
(2 . "NORT-009-A-1FL")
(10 0.0 0.0 0.0)
(41 . 1.0)
(42 . 1.0)
(43 . 1.0)
(50 . 0.0)
(70 . 0)
(71 . 0)
(44 . 0.0)
(45 . 0.0)
(210 0.0 0.0 1.0)
Notice the dxf code 0. Now to get the block definition of selected blocks just use
(setq data (entget (tblobjname "block" (cdr (assoc 2 data)))))
Which will return
(-1 . <Entity name: 75b0ac30>)
(0 . "BLOCK")
(330 . <Entity name: 75b0ac28>)
(5 . "4F16")
(100 . "AcDbEntity")
(67 . 0)
(8 . "0")
(100 . "AcDbBlockBegin")
(70 . 44)
(10 0.0 0.0 0.0)
(-2 . <Entity name: 740dddf8>)
(2 . "NORT-009-A-1FL")
(1 . "NORT-009-A-1FL.DWG")
Now notice the dxf code 0, and the correct way to test dxf code 70 for xref'ness.
Hope that clears some things up.