Tight conditions for when the NTK approximation is valid