checking address type instead of len