GetBlipFromEntity - How to check if exists?

Rather odd wording, but not sure how else to do so.

I’m scanning the area for the closest object of a certain model, which works fine. (Ideally I’d scan the area for any object of that model, then add them to a table, if you know how I might achieve that, please speak up!)

Ideally i want to have a blip appear once that object has been located, along with a notification letting me know, but only if the object doesn’t already have a blip.

However, I’m finding that…

if GetBlipFromEntity(object) == nil then

… isn’t giving me the desired output. There’s clearly no blip for the object as it’s never been assigned as of yet, so surely this would say “oh yes, this is nil as there is no blip”.

The returned blip ID will be 0 if there is no blip, not nil