Your code assumes that every object in (SSGET "_A") has dynamic block properties. But your drawing also contains text objects which obviously lack those properties. Hence the error you have reported. You can fix this by using (SSGET "_A" '((0 . "INSERT"))). But your code will then still have to account for non-dynamic block references where oProps will be nil.
Two other tips:
Look at the built-in (logand) function.
Try to improve your coding style: Create functions, localize variables etc.