Added check for missing device id.

Added check for missing device id.