Check whether a credential object contains username information.
object to check
1 if the credential object has non-NULL username, 0 otherwise