cleanup null check