Gets the password from the Credentials object
the object whose password is to be set.
the password if the object is valid, null otherwise.