How to check the field is password field using selenium webdriver

Testing Android Native Application

I have tried with webele.getAttribute(“password”));
but this is throwing error…
In UIAutomator viewer i can see the object field password which is true.