Try reversing your code. After all THIS.Parent would always result in an Object, if it doesn't we want to execute the default error routine.
IF VARTYPE(This.Parent) <> 'O'
DODEFAULT(nError, cMethod, nLine)
ELSE
This.Parent.Error(nError, cMethod, nLine)
ENDIF