Add null check to osdev to avoid invalid access. Change-Id: If34bc94cd23e3b4f1149a57b43bcc136575ec06c CRs-Fixed: 2658532