added check on nameof device

Signed-off-by: Fons <lord.fontana@gmail.com>