Type check code for memberinfo
Ensure that instance is non-null when using custom type check code for imported types.