add check to nl* functions