add TypeError to protected_run