HasMember check on null reference