If this were to be implemented, people would still be able to obstruct the portals using other blocks such as trap doors or even fence gates. So you'd want to block more than just doors.
I get why you'd want this implemented, but there are a few things to look out for.
Pistons could be used to push blocks in front of portals.
Sand, gravel, and anvils can be dropped in front of portals.
So instead of blocking the placement of blocks in front of the portals, it could possibly be simplified a little more.
Such as checking x blocks around the player to see if they're in an obstructed portal, and teleporting them out to the nearest available space.
Just a thought.