It is demed a best practice to ensure that SQL Server is running on a non default port.
This condition will return a result if the instance being checked is running on either the default (1433) or a dynamic port.
Code here is much simpler than V1 and does not need extended stored procedures, loses granularity of knowing what the default port is.
Further Reading:
Configure a Server to Listen on a Specific TCP Port
Configure the Windows Firewall to Allow SQL Server Access