added null check for AppGetDelegateTypeForMethodCallback