Soliton-defect collisions in the nonlinear Schrödinger equation