Added Enum.IsDefined check before casting to WlanReasonCode or WlanNotificationCodeMsm

This prevents crashing in the event that the value being cast from is not defined in the enumeration.  This crash was observed intermittently on a Windows 8 tablet for WlanReasonCode.  The check for WlanNotificationCodeMsm was included for good measure.