Revert "Remove device check"

This reverts commit d669b8cf3daae6c6fd5ab97bf6441d7f8c64de8f.