Detection of impurity states in nuclear magnetic relaxation