maint: refactor copy to use is_nul()