binding: fix inet_ntop and check for null addresses