Unownable Doors

I have made a DarkRP map. If a player attempts to buy a door, I want the DarkRP gamemode to check the name of the door entity. If the name of the entity is a certain name such as “unownable” then I want the Gamemode not to let the player buy the door. Instead possibly it could display a message to the player’s HUD saying “You cannot own this door!”
Is there a way to do this?

Press F2 on the door as admin.