Detect if an acceleration sensor exist

If it possible to detect if the current device has an accelerometer? I know I can check if the input values of the input.acceleration object are not equal to zero. But what is if the device is motionless rest on a table and that’s the reason why all values are zero?

I found the solution: