Fixed potential NullPointerException in DeviceID

Signed-off-by: benelliott <bengelliott@gmail.com>