Added pwcheck method to handle null user case