Column 'device' cannot be null