adding null check to password if entity contains no password at all